代号一添加了模拟位置权限,如何取消?
Codename one Mock location permission is added, how to remove it?
我创建了一个应用程序,其中我需要用户在代号一中的 GPS 位置,但是当我安装该应用程序时,系统提示我授予权限
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
我通过检查代码知道Codename one添加了权限,所以我不确定是什么触发了这个权限,所以我可以删除它。我唯一使用位置的地方如下:
Location location = LocationManager.getLocationManager().getCurrentLocation();
JSONObject jsonLocation = new JSONObject();
jsonLocation.put(Constants.Latitude, location.getLatitude());
jsonLocation.put(Constants.Longtitude, location.getLongitude());
如何删除此权限?
使用位置 API 会添加各种权限,过去用户要求能够模拟设备中的位置以进行调试。
这似乎是全局添加的,没有禁用该特定权限的选项,因此我们添加了一个构建提示 android.mockLocation=false
,它将允许您显式禁用模拟位置。
2016年11月19日周末(本周)应该可以买到。
我创建了一个应用程序,其中我需要用户在代号一中的 GPS 位置,但是当我安装该应用程序时,系统提示我授予权限
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
我通过检查代码知道Codename one添加了权限,所以我不确定是什么触发了这个权限,所以我可以删除它。我唯一使用位置的地方如下:
Location location = LocationManager.getLocationManager().getCurrentLocation();
JSONObject jsonLocation = new JSONObject();
jsonLocation.put(Constants.Latitude, location.getLatitude());
jsonLocation.put(Constants.Longtitude, location.getLongitude());
如何删除此权限?
使用位置 API 会添加各种权限,过去用户要求能够模拟设备中的位置以进行调试。
这似乎是全局添加的,没有禁用该特定权限的选项,因此我们添加了一个构建提示 android.mockLocation=false
,它将允许您显式禁用模拟位置。
2016年11月19日周末(本周)应该可以买到。