ILocationListener.OnProviderEnabled(String) Method

Definition

Called when a provider this listener is registered with becomes enabled.

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

Parameters

provider
String

the name of the location provider

Attributes

Remarks

Called when a provider this listener is registered with becomes enabled.

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