LocationManager.PROVIDERS_CHANGED_ACTION will not work on API 26 and higher
I am using following code to get location on/off event. <receiver android:name=".receivers.GpsReceiver" android:enabled="true"> <intent-filter> <action android:name="android.location.PROVIDERS_CHANGED" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </receiver> I am developing geofence based app. Based on Re-register geofences only when required we have to re register the geofences after the app has received a GEOFENCE_NOT_AVAILABLE alert. This typically happens after NLP (Android's Network Location Provider) is disabled. By using this broadcast receiver I re