Lets say you implement the following code:
Window.Current.VisibilityChanged += Current_VisibilityChanged;
Window.Current.SizeChanged += Current_SizeChanged;
Window.Current.Activated += Current_Activated;
Window.Current.Closed += Current_Closed;
App.Current.Resuming += Current_Resuming;
App.Current.Suspending += Current_Suspending;
Action Panel

None of the above events will be raised if the action panel opens, yes nothing!
Settings
If the user tappes the ALL SETTINGS
then it will navigate to the Settings Page and a few events will be raised:
- Current_VisibilityChanged
- Current_Closed
- Current_Suspending
returning to the app
- Current_Resuming
- Current_VisibilityChanged
- Current_Activated
Geolocator (the solution)
Inside the Geolocator
class there is a StatusChanged event to which you should subscribe.
If the user switched Location
on then you should wait for StatusChangedEventArgs.Status
to become Ready
before you continue to try and acquire the position, and if it becomes Disabled
then stop.
It is much better to subscribe to this event because it allows you to know exactly what is going on.