Hi,
i trying get network location from TC75 with Lollipop (Version 20.05 Non-GMS), but device never return any data.
With GMS version (Version 20.05 With GMS) work everything fine, network location returned in a few seconds.
Is GMS (google services) needed for checking network location or not? Or blocked Non-GMS this method?
I use standard android LOCATION_SERVICE, not Google’s Location Services API, like something this ...
LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 10000, 10, new LocationListener() {
Is wrong Non-GMS images? Need network location google services? It works to someone else?
Thanks
TC75 - Lollipop Non-GMS - network location problem |
1 Replies
Hi, you need to set your device's location settings to 'High Accuracy' in order to obtain location information from the NETWORK_PROVIDER. Not exactly sure why that is and it seems to be a quirk of AOSP devices. Even with a SIM installed & WiFi enabled on these devices you will only get course cell-tower based locationing through the Network Provider.
Of course, if your device is in 'High Accuracy' mode then you may as well use the GPS provider as you will likely get higher accuracy fixes, at least outdoors.
It is an area I am trying to understand better myself, I have an application that exercises the different APIs if it is useful (GitHub - darryncampbell/Location-API-Exerciser: Small application to show the different location APIs on Android ) but there is no Zebra support for that application. Another option is to scan nearby Wifi APs and use Google's geolocate API, as shown in that test application: Location-API-Exerciser/GMapsGeolocationAPIWrapper.java at master · darryncampbell/Location-API-Exerciser · GitHub .