2016-11-16 50 views
1

我创建了一个应用程序中,我需要在代号一个用户的GPS位置,但是当我安装提示我给予准许Codename one添加模拟位置权限,如何删除它?

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

的应用程序,我知道,代号一个通过检查的代码添加权限,所以我不确定什么触发了这个权限,所以我可以删除它。我使用位置的唯一位置如下:

  Location location = LocationManager.getLocationManager().getCurrentLocation(); 
      JSONObject jsonLocation = new JSONObject(); 
      jsonLocation.put(Constants.Latitude, location.getLatitude()); 
      jsonLocation.put(Constants.Longtitude, location.getLongitude()); 

我该如何删除此权限?

回答

1

使用位置API会添加各种权限,过去用户要求能够在设备中模拟位置以进行调试。

看起来这是全局添加的,没有禁用该特定权限的选项,因此我们添加了一个构建提示android.mockLocation=false,这将允许您显式禁用模拟位置。

它应该在2016年11月19日(本周)的周末提供。