I am trying to get the compass heading on my Android device. Therefore I tried to get the heading with the Xamarin.Mobile component, but as this thread reports the heading is always 0. Is there any other possibility to get the compass heading on my Android device?
Asked
Active
Viewed 1,493 times
1 Answers
3
Fisrt of all you need to check if you device support CompassHeading, as not all devices support it. So to check, use Xamarin.Geolocation.Geolocator.SupportsHeading, it will return true if device support heading. Also try one of the "compass" apps on the google play to make sure if you device support it.

choper
- 1,292
- 8
- 10
-
My device supports compass heading and I also tested the app in the emulator. – fraherm Mar 17 '14 at 10:12
-
1Have you setted permissions? You have to set the ACCESS_FINE_LOCATION and also to switch on GPS – choper Mar 17 '14 at 11:04
-
I don't know what happened, but it works now. Thanks anyway for your help. – fraherm Mar 17 '14 at 16:44