Reputation: 97
I have an android device that have a GPS chip on it and I want to get location using it, but the device doesn't have google play service installed (it doesn't support google play service). So I'm not able to use android standard LocationManager
.
Does anyone have suggestions how to get location?
Upvotes: 0
Views: 2567
Reputation: 103
You can use the LocationManager
which does not require Google Play Services and gives you direct access to GPS, network, and/or passive location updates.
You are likely trying to use the newer Location API which require Google Play Services. The newer API, which replaces the LocationManager
with the FusedProvider
automatically switches between passive, network and GPS based on user settings and location. While this is simpler to implement and likely more battery efficient, you should be completely fine using the older LocationManager
.
Upvotes: 1