Apps handle GeoFence needs to receive PROVIDERS_CHANGED broadcast since:
- Registered GeoFences will be removed when both 2 location providers (network and GPS) are turned off.
- When one of 2 location providers is turned on, app needs to register GeoFences to work. This should be performed w/o asking user to run my app again.
So my app has been registering its broadcast receiver in manifest. But it does not work any more in Android Oreo since PROVIDERS_CHANGED is not one we can make it work as before.
I can register broadcast receiver for that in app's activity or in service but it will quit (end its life cycle) sooner or later, then I need to unregister it. My app starts working by some events like GeoFence transition, but receiving PROVIDERS_CHANGED is critical to make it work.
I verified PROVIDERS_CHANGED can't be received by receiver registered in manifest in Android Oreo. Is there any solution for it?