Android.Locations.LocationManager.AddTestProvider Method
Creates a mock location provider and adds it to the set of active providers.

Syntax

[Android.Runtime.Register("addTestProvider", "(Ljava/lang/String;ZZZZZZZII)V", "GetAddTestProvider_Ljava_lang_String_ZZZZZZZIIHandler")]
public virtual void AddTestProvider (string name, bool requiresNetwork, bool requiresSatellite, bool requiresCell, bool hasMonetaryCost, bool supportsAltitude, bool supportsSpeed, bool supportsBearing, [Android.Runtime.GeneratedEnum] Power powerRequirement, [Android.Runtime.GeneratedEnum] Android.Hardware.SensorStatus accuracy)

Parameters

name
the provider name
requiresNetwork
Documentation for this section has not yet been entered.
requiresSatellite
Documentation for this section has not yet been entered.
requiresCell
Documentation for this section has not yet been entered.
hasMonetaryCost
Documentation for this section has not yet been entered.
supportsAltitude
Documentation for this section has not yet been entered.
supportsSpeed
Documentation for this section has not yet been entered.
supportsBearing
Documentation for this section has not yet been entered.
powerRequirement
Documentation for this section has not yet been entered.
accuracy
Documentation for this section has not yet been entered.

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 a provider with the given name already exists

Remarks

Creates a mock location provider and adds it to the set of active providers.

[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