ILocationListener.OnStatusChanged(String, Availability, Bundle) Method

Definition

This callback will never be invoked on Android Q and above, and providers can be considered as always in the LocationProvider#AVAILABLE state.

[Android.Runtime.Register("onStatusChanged", "(Ljava/lang/String;ILandroid/os/Bundle;)V", "GetOnStatusChanged_Ljava_lang_String_ILandroid_os_Bundle_Handler:Android.Locations.ILocationListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void OnStatusChanged (string? provider, Android.Locations.Availability status, Android.OS.Bundle? extras);
[<Android.Runtime.Register("onStatusChanged", "(Ljava/lang/String;ILandroid/os/Bundle;)V", "GetOnStatusChanged_Ljava_lang_String_ILandroid_os_Bundle_Handler:Android.Locations.ILocationListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnStatusChanged : string * Android.Locations.Availability * Android.OS.Bundle -> unit

Parameters

provider
String

the name of the location provider associated with this update.

status
Availability

Android.Locations.LocationProvider.OUT_OF_SERVICE if the provider is out of service, and this is not expected to change in the near future; Android.Locations.LocationProvider.TEMPORARILY_UNAVAILABLE if the provider is temporarily unavailable but is expected to be available shortly; and Android.Locations.LocationProvider.AVAILABLE if the provider is currently available.

extras
Bundle

an optional Bundle which will contain provider specific status variables.

A number of common key/value pairs for the extras Bundle are listed below. Providers that use any of the keys on this list must provide the corresponding value as described below.
  • satellites - the number of satellites used to derive the fix :
Attributes

Remarks

This callback will never be invoked on Android Q and above, and providers can be considered as always in the LocationProvider#AVAILABLE state.

<p class="note">Note that this method only has a default implementation on Android R and above, and this method must still be overridden in order to run successfully on Android versions below R. LocationListenerCompat from the compat libraries may be used to avoid the need to override for older platforms.

This member is deprecated. This callback will never be invoked on Android Q and above.

Java documentation for android.location.LocationListener.onStatusChanged(java.lang.String, int, android.os.Bundle).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to