LocationManager.AddTestProvider Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddTestProvider(String, ProviderProperties) |
Creates a test location provider and adds it to the set of active providers. |
AddTestProvider(String, ProviderProperties, ICollection<String>) |
Creates a test location provider and adds it to the set of active providers. |
AddTestProvider(String, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Power, SensorStatus) |
Creates a test location provider and adds it to the set of active providers. |
AddTestProvider(String, ProviderProperties)
Creates a test location provider and adds it to the set of active providers.
[Android.Runtime.Register("addTestProvider", "(Ljava/lang/String;Landroid/location/provider/ProviderProperties;)V", "GetAddTestProvider_Ljava_lang_String_Landroid_location_provider_ProviderProperties_Handler", ApiSince=31)]
public virtual void AddTestProvider (string provider, Android.Locations.Provider.ProviderProperties properties);
[<Android.Runtime.Register("addTestProvider", "(Ljava/lang/String;Landroid/location/provider/ProviderProperties;)V", "GetAddTestProvider_Ljava_lang_String_Landroid_location_provider_ProviderProperties_Handler", ApiSince=31)>]
abstract member AddTestProvider : string * Android.Locations.Provider.ProviderProperties -> unit
override this.AddTestProvider : string * Android.Locations.Provider.ProviderProperties -> unit
Parameters
- provider
- String
the provider name
- properties
- ProviderProperties
- Attributes
Remarks
Creates a test location provider and adds it to the set of active providers. This provider will replace any provider with the same name that exists prior to this call.
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
AddTestProvider(String, ProviderProperties, ICollection<String>)
Creates a test location provider and adds it to the set of active providers.
[Android.Runtime.Register("addTestProvider", "(Ljava/lang/String;Landroid/location/provider/ProviderProperties;Ljava/util/Set;)V", "GetAddTestProvider_Ljava_lang_String_Landroid_location_provider_ProviderProperties_Ljava_util_Set_Handler", ApiSince=31)]
public virtual void AddTestProvider (string provider, Android.Locations.Provider.ProviderProperties properties, System.Collections.Generic.ICollection<string> extraAttributionTags);
[<Android.Runtime.Register("addTestProvider", "(Ljava/lang/String;Landroid/location/provider/ProviderProperties;Ljava/util/Set;)V", "GetAddTestProvider_Ljava_lang_String_Landroid_location_provider_ProviderProperties_Ljava_util_Set_Handler", ApiSince=31)>]
abstract member AddTestProvider : string * Android.Locations.Provider.ProviderProperties * System.Collections.Generic.ICollection<string> -> unit
override this.AddTestProvider : string * Android.Locations.Provider.ProviderProperties * System.Collections.Generic.ICollection<string> -> unit
Parameters
- provider
- String
the provider name
- properties
- ProviderProperties
the provider properties
- extraAttributionTags
- ICollection<String>
additional attribution tags associated with this provider
- Attributes
Remarks
Creates a test location provider and adds it to the set of active providers. This provider will replace any provider with the same name that exists prior to this call.
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
AddTestProvider(String, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Power, SensorStatus)
Creates a test location provider and adds it to the set of active providers.
[Android.Runtime.Register("addTestProvider", "(Ljava/lang/String;ZZZZZZZII)V", "GetAddTestProvider_Ljava_lang_String_ZZZZZZZIIHandler")]
public virtual void AddTestProvider (string provider, bool requiresNetwork, bool requiresSatellite, bool requiresCell, bool hasMonetaryCost, bool supportsAltitude, bool supportsSpeed, bool supportsBearing, Android.Locations.Power powerRequirement, Android.Hardware.SensorStatus accuracy);
[<Android.Runtime.Register("addTestProvider", "(Ljava/lang/String;ZZZZZZZII)V", "GetAddTestProvider_Ljava_lang_String_ZZZZZZZIIHandler")>]
abstract member AddTestProvider : string * bool * bool * bool * bool * bool * bool * bool * Android.Locations.Power * Android.Hardware.SensorStatus -> unit
override this.AddTestProvider : string * bool * bool * bool * bool * bool * bool * bool * Android.Locations.Power * Android.Hardware.SensorStatus -> unit
Parameters
- provider
- String
the provider name
- requiresNetwork
- Boolean
- requiresSatellite
- Boolean
- requiresCell
- Boolean
- hasMonetaryCost
- Boolean
- supportsAltitude
- Boolean
- supportsSpeed
- Boolean
- supportsBearing
- Boolean
- powerRequirement
- Power
- accuracy
- SensorStatus
- Attributes
Exceptions
if OpstrMockLocation is not set to ModeAllowed for your app.
if a provider with the given name already exists
Remarks
Creates a test location provider and adds it to the set of active providers. This provider will replace any provider with the same name that exists prior to this call.
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.