Mock Locations on Android 12

2.1k views Asked by At

I am testing an app that uses geofencing and I need to be able to specify mock locations. In my research I found old posts (5 years) talking about using Allow Mock Locations in developer options but that seems to only be in older versions of Android. Now I see a place to specify a mock location app but no way to specify one. I looked at code samples to create a mock location app but the permission that has to be set (ACCESS_MOCK_LOCATION) appears to be only valid for system apps. Is there no way to do this anymore without rooting?

1

There are 1 answers

0
blackkara On

Firstly, the apps that acquire ACCESS_MOCK_LOCATION appear in developer options, which means you will be able to select your app as a mock location app when you add-in manifest

Secondly, ACCESS_MOCK_LOCATION is not a system app permission. So there is no need for rooting the device or marking your app as a system app etc.