Check if Google Play location service is enabled

时间:2015-07-28 15:55:21

标签: android

How can I check if Google Play location services are enabled? None of the answers on StackOverFlow address the issue directly. I'm not interested in last location, whetever or not GPS and network providers are enabled in system or anything, I just want to know, if Google Play location services are enabled.

I tried using getLocationAvailability().isLocationAvailable(), but it returned true (after location was retrieved for first time) even after I disabled Google Play location services, which then prevented the application from working correctly.

Image of setting (first one on the image, ignore arrow): http://img.wonderhowto.com/img/38/89/63522883742111/0/psa-googles-keeping-tabs-your-location-heres-stop-them.w654.jpg

Is there any way to check for this?

0 个答案:

没有答案