I have an application that uses a Network provider for its location. Every time the apps starts it checks to see whether the Network provider is enabled using isProviderEnabled()
method in LocationManager.
If it returns false I present an alert to the user to enable Network Provider and then use the application. This logic had been working really well, with a few exceptions with non-Google certified devices(not a concern since they usually do not have Maps API either). Lately, with some devices on ICS and now on JellyBean emulator, I get a consistent "false" for isProviderEnabled()
even though it is enabled.
I have since moved to use the string returned from
Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED)) to see whether it contains "network". It is a hack but it is working for now. I would love to be able to use isProviderEnabled()
method.
Has anyone seen this issue before?