onStatusChanged situations
Asked Answered
S

1

8

I have some doubts regarding onStatusChanged from LocationListener class.

It know it can present three states: AVAILABLE, TEMPORARILY_UNAVAILABLE and OUT_OF_SERVICE

  1. 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?

  2. How about OUT_OF_SERVICE, when does it get triggered? Right before onProviderDisabled ?

  3. Is it possible to simulate these events (statuses) with the emulator?

Stash answered 17/8, 2016 at 12:52 Comment(0)
G
1

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 future
  • TEMPORARILY_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

Glaze answered 3/9, 2016 at 0:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.