Handle null locations on getLastLocation and remove stale last locations
ekigamba opened this issue · 5 comments
This seems that it can happen on rare occasions
https://developer.android.com/training/location/retrieve-current#java
- Handle null locations after calling
getLastLocation
on theFusedLocationClient
- Reset
lastLocation
to null if thelocation services
or location on the device has been turned off - Improve
last location
andlocation updates
accuracy and suitability by using the algorithm provided by google https://developer.android.com/guide/topics/location/strategies#BestEstimate - To be able to save battery, once an accurate location have been retrieved. Can the Geowidget support a way for the host app to reduce the frequency of updates? This will be configurable after the initial default setup of update intervals to support throttling down update requests with an aim to reduce on power consumption
As requested by @githengi
To be able to save battery, once an accurate location have been retrieved. Can the Geowidget support a way for the host app to increase the frequency of updates.
You mean decrease the frequency of updates?
Yes
Should we do that out-of-the-box or should that be something that is configurable by a host application if it wants that? I am thinking of a standard way to do that. I do not know if this should be the standard out-of-the-box?
Can you also provide the numbers in terms of updateIntervals that you are thinking about?
This should be configurable in the host application. The host application should be able to setup updateIntervals