Share via


LocationManager.SetTestProviderEnabled(String, Boolean) Method

Definition

Sets the given test provider to be enabled or disabled.

[Android.Runtime.Register("setTestProviderEnabled", "(Ljava/lang/String;Z)V", "GetSetTestProviderEnabled_Ljava_lang_String_ZHandler")]
public virtual void SetTestProviderEnabled (string provider, bool enabled);
[<Android.Runtime.Register("setTestProviderEnabled", "(Ljava/lang/String;Z)V", "GetSetTestProviderEnabled_Ljava_lang_String_ZHandler")>]
abstract member SetTestProviderEnabled : string * bool -> unit
override this.SetTestProviderEnabled : string * bool -> unit

Parameters

provider
String

the provider name

enabled
Boolean

the mock enabled value

Attributes

Exceptions

if OpstrMockLocation is not set to ModeAllowed for your app.

if no provider with the given name exists

Remarks

Sets the given test provider to be enabled or disabled.

Java documentation for android.location.LocationManager.setTestProviderEnabled(java.lang.String, boolean).

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