Enable Mock Locations in Android Marshmallow

江枫思渺然 提交于 2019-12-05 08:18:28

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

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!