Check If Location Is Unavailable In Android Location Client
Solution 1:
The accepted answer was correct at the time. But in recent times things have changed with the availability of the SettingsApi It allows you to check if the location services are available on the device and there is a complete example provided by google on github that shows how to use this API. The sample code will prompt the user to enable location if it's switched off.
Solution 2:
AFAIK, there is no method to check availability.
Possible Reason:
LocationClient
uses fused API which gives location with appropriate combination
of GPS,WiFi,Cell,Sensors (according to the Priority
you have set for retrieving location).
Reference:
Fused API - Beyond the blue dot
Alternate Answer :
You already know it.you can check availability of provider by using location system service
and LocationManager
Post a Comment for "Check If Location Is Unavailable In Android Location Client"