LocationManager.SetTestProviderLocation(String, Location) 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.
Sets a new ___location for the given test provider.
[Android.Runtime.Register("setTestProviderLocation", "(Ljava/lang/String;Landroid/___location/Location;)V", "GetSetTestProviderLocation_Ljava_lang_String_Landroid_location_Location_Handler")]
public virtual void SetTestProviderLocation(string provider, Android.Locations.Location ___location);
[<Android.Runtime.Register("setTestProviderLocation", "(Ljava/lang/String;Landroid/___location/Location;)V", "GetSetTestProviderLocation_Ljava_lang_String_Landroid_location_Location_Handler")>]
abstract member SetTestProviderLocation : string * Android.Locations.Location -> unit
override this.SetTestProviderLocation : string * Android.Locations.Location -> unit
Parameters
- provider
- String
the provider name
- ___location
- Location
the mock ___location
- Attributes
Exceptions
if OpstrMockLocation is not set to ModeAllowed for your app.
if no provider with the given name exists
if the ___location is incomplete
Remarks
Sets a new ___location for the given test provider. This ___location will be identiable as a mock ___location to all clients via Location#isMock()
.
The ___location object must have a minimum number of fields set to be considered valid, as per documentation on Location
class.
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.