Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Caused by: java.lang.SecurityException: com.example.geofences from uid 10049 not allowed to perform MOCK_LOCATION

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

like image 245
kgsharathkumar Avatar asked Dec 21 '16 05:12

kgsharathkumar


1 Answers

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,

like image 178
kgsharathkumar Avatar answered Nov 11 '22 09:11

kgsharathkumar