I want to notify when I lose the GPS signal,I found this :
https://stackoverflow.com/a/8322160/1034806
But how can I compare two values of getTime() if onLocationChanged() is not launched?
I want to notify when I lose the GPS signal,I found this : https://stackoverflow.com/a/8322160/1034806
Share
The simplest way is send delayed message:
And just call
postDelayedGpsLostCheck()method each timeonLocationChanged()method is called.You even don’t need to save and compare times.
Also don’t forget to call
when you go out from activity.