Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable Mock Locations in Android Marshmallow

I cannot get mock locations to work in Android Marshmallow. I have installed app in Android 6.0 . Now, When I want to set mock location for this app by following option.

Setting >> Developer Option >> Select Mock location app

I can not see any Application to select.

Has anyone had success enabling mock locations under Marshmallow?

like image 833
minh2611 Avatar asked Sep 24 '15 06:09

minh2611


People also ask

How do I enable mock locations on Android?

Go to your “Settings”, “Systems”, “About Device” and tap multiple times on “Build number” and activate the Developer Mode. A new “Developer Options” menu will be available under “Settings” / “Systems” In the “Developer Options” menu, scroll down to “Debugging” and activate the “Allow mock locations”.

Why is my mock location not working?

Recheck the app and try to make sure your spoofing has been enabled. You can also try using different apps to see if the first app you chose isn't working properly on your phone. Also, make sure to check to see if your device's GPS signal is on.

How do you use mock location without developer options?

Step 1: Download the Fake GPS Location app from the Google Play Store on your Android phone. Use the search bar, and it will pop up amongst the search results. Step 2: After installation, select this app as your mock location app on your phone by exploring your device settings.


2 Answers

If you use the Mock location permission:

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

Then you will be able to select your app by Setting >> Developer Option >> Select Mock location app

like image 198
xiaomi Avatar answered Oct 20 '22 01:10

xiaomi


I was facing the same problem. Even though my app's manifest file (debug build) had the required permission (ACCESS_MOCK_LOCATION), the Select Mock Location app showed no app in the list.

Solution:

I started my application, pressed the home button (to send my app's activity to the background), and then navigated to Settings -> Developer Options -> Select Mock Location App. My app was now visible in the list.

like image 2
BajajG Avatar answered Oct 20 '22 01:10

BajajG