I’ve created a service implementing LocationManager. I have a question though.
Let’s say I ask for a location update, but the user can’t get any GPS connection where he/she is. In order to save battery life, how to define I would like the app to look for location datas for example 60 sec? If a location is found below 60 sec, it is signified to the user and if the 60 sec limit is reached, it will be signified to the user.
When you call
requestForLocationUpdates()– start a 60 second Timer.In case
onLocationChanged()is not called on completion of this Timer – you perhaps Toast