I have Xamarin.Forms project and I am trying to mock GPS provider in Android project. In my code I created test provider like this...
lockManager.AddTestProvider("gps_test_provider",
"requiresNetwork" == "",
"requiresSatellite" == "",
"requiresCell" == "",
"hasMonetaryCost" == "",
"supportsAltitude" == "",
"supportsSpeed" == "",
"supportsBearing" == "",
Power.Low,
Android.Hardware.SensorStatus.AccuracyLow);
Then I have there function to mock GPS, but it fails everytime on this error...
java.lang.SecurityException: Requires ACCESS_MOCK_LOCATION secure setting
which is weird, because I have this permission enabled.
Have somebody tried to mock the provider for Android? Can you provide me some example? Then I need to do the same for iOS.