开启高精度定位
条评论三种定位模式
Hight Accuracy
Battery Saving
GPS Only
1
2
3
4public static final int LOCATION_MODE_OFF = 0;
public static final int LOCATION_MODE_SENSORS_ONLY = 1;
public static final int LOCATION_MODE_BATTERY_SAVING = 2;
public static final int LOCATION_MODE_HIGH_ACCURACY = 3设置界面的定位设置相关代码路径:
/packages/apps/Settings/src/com/android/settings/location/LocationSettings.java
/packages/apps/Settings/src/com/android/settings/location/LocationSettingsBase.java
设置:
1 | Settings.Secure.getInt(activityUnderTest.getContentResolver(), Settings.Secure.LOCATION_MODE); |
初始化值:frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\DatabaseHelper.java
里面有loadSecureSetting()方法在这里添加
本文标题:开启高精度定位
文章作者:xmaihh
发布时间:2018-07-26
最后更新:2018-07-26
原始链接:https://xmaihh.github.io/blog/2018/07/26/kai-qi-gao-jing-du-ding-wei/
版权声明:采用[CC BY-NC-SA 4.0许可协议]进行许可
分享