- provider
- the provider name
- loc
- the mock location
Type Reason Java.Lang.SecurityException if 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.IllegalArgumentException if no provider with the given name exists Java.Lang.IllegalArgumentException if the location is incomplete
Sets a mock location for the given provider.
This location will be used in place of any actual location from the provider. The location object must have a minimum number of fields set to be considered a valid LocationProvider Location, as per documentation on Android.Locations.Location class.