1

I am trying to test an app i have been sitting on for a while. In order to do that i need to use the option "Allow mock Locations", so i set it to on. But as soon as i refresh the page it's gets automatically turned back off every single time. So i am unable to use this option. I tried finding if an installed app does effect that but as it turned out was not the problem there. This is the only rooted phone i have so i need to get this working on this device. I'm using 5.1.1, OnePlus X

Anybody maybe with a similar problem or any suggestions?

Thank you.

0

Things you can try:

If testing on an actual device, make sure that you have the "Developer options" turned on, and a check on the "allow mock locations" checkbox.

From the phone's location settings, make sure the location is not gotten by using Wi-Fi and mobile networks, so only "GPS" or in some models "Device Only" checked.

Finally, if you are developing the app yourself and/or have access to it's manifest; check to see that the manifest contains the correct permission:

<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" /> 

for further help concerning development issues, you can read from this post on stack overflow for assistance: https://stackoverflow.com/questions/2531317/android-mock-location-on-device

I left this answer here for further reference in case it will be useful for others.

  • 1
    Yea i got that... The problem is, right after i CHECK the "allow mock locations" it get's UNCHECKED (turned off) again. P.S. If i did not hade "Developer mode" activated i would not be able to access the screen... – user3337790 Jul 25 '16 at 11:40
  • have you verified that it is only happening for the "allow mock locations" checkbox? for e.g. if you check the "stay awake" checkbox, does it also revert back to default unchecked, or is the problem only occuring with the mock locations checkbox? – ghoulfolk Jul 25 '16 at 11:58
  • Yes, onley for "Allow mock Locations" any other option i set in the DEV mode it's stay's in place, onley this one get's unchecked. – user3337790 Jul 25 '16 at 11:59
  • I got that, i also thought that was missing so i went and check everything but it is there. Also no mather if start the app or not, or if i have ANY app running or not the "Allow mock Locations" still get's automaticly unchecked. – user3337790 Jul 25 '16 at 12:06
  • Tried that just now, still the same issue. The "Allow mock Locations" keeps getting unchecked right away. :/ – user3337790 Jul 25 '16 at 12:27

protected by Community Jul 26 '16 at 10:03

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.