Is there a way to be notified when the GPS is switched on/off?
I noticed that when the device is switched off an then on again, getLastKnownLocation(provider) is null. S
Register a BroadcastReceiver to listen for the LocationManager's PROVIDERS_CHANGED_ACTION Intent. This will be broadcast when the GPS provider (and other providers) is enabled / disabled.