I am working on an application with a requirement to track the current location, rather precisely over a long period of time.
I decided to use the Fused Location Provider API for that purpose since it is designed for battery saving and efficiency.
Over some time of testing now I have ended up with a couple deal- breaking issues in the fused location provider api or even deeper down the software stack in the NETWORK_PROVIDER
( which I believe is being used by the fused location provider ).
- Non- stationary wifi hotspots are setting the user off sometimes by thousands of kilometers. It seems to be the case that WIFI hotspots are used for triangulation even if they are portable devices. (Tethering/ Train wifi/ Airplane wifi) In that case the device thinks with great accuracy that it is exactly at the wrong location. One could argue that that can be filtered out but what makes things even more tricky is, that some magic including sensors is going on in the fused location provider so it appears the phone is being moved at those locations.
- Sometimes old locations are coming back I have observed that after a period of 2 weeks of uninterrupted location updates old locations start to resurface. This is especially weird since the locations in the callbacks are coming with a new timestamp.
- Locations with timestamps in the future: It took a lot of time to figure that one out, but I have also observed that users have been receiving timestamps in the future through their locations callbacks. I am in doubt wether the user's device is set to an incorrect time, because the timestamps are usually some weeks in the future. The fix for that is rather obvious, I am just gonna write it down here so you guys can take it into account when filtering out stuff.
I have tried all types of LocationRequest priorities and a lot of various parameters for them. The non-stationary WIFI issue remains in all scenarios and affects all apps on the device including google's own.
What came to mind first was to just try to ignore location locks coming in through WIFI triangulation but since there no way of knowing where the location comes from using the Fused location api, that idea was a deadend.
Filtering out those locations is also really tricky since well, the device often stays at wrong locations for hours/days and moves there.
I have found that there are already quite some google bug tracker issues that have been opened mentioning at least issue 1. (https://issuetracker.google.com/issues/37123060 for example) None of the issues has ever been addressed.
I am thinking of ditching the Fused Location provider for good since everything I try is a deadend. That leads me to ask the following questions:
- Is nobody else having these really blocking issues?
- Does anyone of you have experience with alternatives to the fused location provider? I have tried https://github.com/mapzen/lost, but I have found that general location noise is rather big and will require some work to get it to the state of google's api, and since it is also using the WIFI location provided by google, will probably have the same issue.
- Would you go down the path of falling back to a GPS only approach, probably sacrificing battery efficiency?
- Since the wrong locations effect all apps on the device including google's own location based apps, why is this issue not being prioritized by the tech giant who should have the greatest interest in being able to know where their customer currently is?
Thanks for any help.
EDIT: The issue is now being discussed as well at https://issuetracker.google.com/issues/37058437
**EDIT (August 8 2017) Added another strange finding in location callbacks