I'm working on GPS location related App, i'm faceing below issue while genarating Mock Location points to App for testing.
Caused by: java.lang.SecurityException: com.example.geofences from uid 10049 not allowed to perform MOCK_LOCATION
We need to do two steps:
Step 1: Give a permission in Android Manifest
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"></uses-permission>
Step 2: In your real device,
Go to Setting --> Developer option --> Mock location app option and select your app for testing.
Mock location works fine... :)
Thanks,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With