I am trying to implement to Ionic device-orientation plugin.
I’ve added to flowing to code to my App:
this.subscription = this.deviceOrientation.watchHeading({frequency: 1000}).subscribe(
function(data){
alert(data.magneticHeading)
}
);
I am using the Android Emulator to test the orientation value. But a always get the value 0.
I also ensured that the setting of the orientation works in Android Emulator (by using a compass-App)
Does anybody has an idea why the orientation doesn’t change ?