Android.Locations.LocationManager.SetTestProviderStatus Method
Sets mock status values for the given provider.

Syntax

[Android.Runtime.Register("setTestProviderStatus", "(Ljava/lang/String;ILandroid/os/Bundle;J)V", "GetSetTestProviderStatus_Ljava_lang_String_ILandroid_os_Bundle_JHandler")]
public virtual void SetTestProviderStatus (string provider, [Android.Runtime.GeneratedEnum] Availability status, Android.OS.Bundle extras, long updateTime)

Parameters

provider
the provider name
status
the mock status
extras
a Bundle containing mock extras
updateTime
the mock update time

Exceptions

TypeReason
Java.Lang.SecurityExceptionif the ACCESS_MOCK_LOCATION permission is not present or the NoType:android/provider/Settings$Secure;Href=../../../reference/android/provider/Settings.Secure.html#ALLOW_MOCK_LOCATION} system setting is not enabled
Java.Lang.IllegalArgumentExceptionif no provider with the given name exists

Remarks

Sets mock status values for the given provider. These values will be used in place of any actual values from the provider.

[Android Documentation]

Requirements

Namespace: Android.Locations
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 3