Compartir a través de


ILocationListener.OnProviderDisabled(String) Method

Definition

Called when the provider this listener is registered with becomes disabled.

[Android.Runtime.Register("onProviderDisabled", "(Ljava/lang/String;)V", "GetOnProviderDisabled_Ljava_lang_String_Handler:Android.Locations.ILocationListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void OnProviderDisabled (string provider);
[<Android.Runtime.Register("onProviderDisabled", "(Ljava/lang/String;)V", "GetOnProviderDisabled_Ljava_lang_String_Handler:Android.Locations.ILocationListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnProviderDisabled : string -> unit

Parameters

provider
String

the name of the location provider

Attributes

Remarks

Called when the provider this listener is registered with becomes disabled. If a provider is disabled when this listener is registered, this callback will be invoked immediately.

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

Java documentation for android.location.LocationListener.onProviderDisabled(java.lang.String).

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