Is there an alternative to Location Client (Google Play API)?

I am working on an application that uses location data and it should work in China. The Android devices sold here generally do not have the Google Play API installed, and the only way is to install it for installation. So I am stuck with a LocationManager, which works much worse than a LocationClient (part of the Google Play API).

My problem is that the LocationManager when reading from GPS_PROVIDER often cannot connect to sufficient satellites (in China) and sometimes there is a significant amount of time between corrections. When reading from NETWORK_PROVIDER I can get more frequent corrections, but the accuracy varies from 30 to 500. Nowhere near the quality of the LocationClient API.

The application should track your movement on the streets often, for example. update every second (battery usage, not a problem for my client) and do something when you reach certain places.

If I use the Google Play API and LocationClient, it really works well. But this is only on Nexus4 or on some non-Chinese Android device.

I ask if anyone knows a library that can give better results than using the LocationManager directly or deciding how to use the LocationManager to improve the results?

+7
android google-play-services geolocation locationmanager location-client
source share
1 answer

GPS does not work well due to the lack of necessary GPS metadata (ephemeris and almanac data) or due to the slow receipt of this metadata. In the latter case, in most countries, GPS ephemeris and almanac data are available through network sources. If not, then the GPS chip should download it from satellites, which can take 5-20 minutes (the fastest time when the original data stream provided enough information for the GPS chip to get a lock). I am not familiar with the availability of this data in China through network sources, but it does not seem to be widely available from what you experience. (Keywords for google for more information: SUPL, ephemeris, alamanac).

When GPS is unavailable or slow to get blocking, network geolocation is backup, which uses Wi-Fi points and cell towers to triangulate the position. This requires an Internet service so that the device sends the APs + towers that it sees, and the service sends the location back. For this, accuracy levels from 30 to 500 meters are well suited.

(BTW, the network geolocation position is also used to โ€œcountโ€ the GPS chip to help it block faster).

Android network geolocation is usually provided by the google web service, but the phone can be configured to be used by other providers by operators.

You can avoid using Google (Google Play or the Google geolocation server) or the built-in network location service by trying the free Mozilla network geolocation service: https://location.services.mozilla.com/

You need to request the API key: https://location.services.mozilla.com/api For example code: this application fills in and is a client for the service: https://github.com/mozilla/MozStumbler

I doubt that this will improve the accuracy of the geolocation of the network for the area you are in, since you are already getting good results, but it may be worth exploring.

+1
source share

All Articles