I have some doubts regarding onStatusChanged
from LocationListener
class.
It know it can present three states: AVAILABLE
, TEMPORARILY_UNAVAILABLE
and OUT_OF_SERVICE
Does AVAILABLE
gets triggered only when coming out of TEMPORARILY_UNAVAILABLE
? Or when the GPS has just finished warming-up ?
Or right before the first location update?
How about OUT_OF_SERVICE
, when does it get triggered? Right before onProviderDisabled
?
Is it possible to simulate these events (statuses) with the emulator?
According android source code explanation:
OUT_OF_SERVICE
is returned if the provider is out of service, and this is not expected to change in the near futureTEMPORARILY_UNAVAILABLE
is returned if the provider is temporarily unavailable but is expected to be available shortly AVAILABLE
is returned if the provider is currently available. If extras is non-null, additional status information may be added to it in the form of provider-specific key/value pairs.LINK
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With