Question

Is there any option to start/stop compass after compass sensor was requested.

I would to stop receiving events from compass to save battery but found no such an option (no dispose, no close, no stop as we have for windows phone)

Thanks!

Was it helpful?

Solution

if you are using C# you can unsubscribe for the event to stop receiving notifications from the compass. I dont think it is possible to turn off the compass altogether as other applications may be using it

Subscribe:

       _compass.ReadingChanged += new TypedEventHandler<Compass, CompassReadingChangedEventArgs>(ReadingChanged);

UnSubscribe:

       _compass.ReadingChanged -= ReadingChanged;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top