Android ACCESS_LOCATION_EXTRA_COMMANDS permission

2019-02-02 09:30发布

Android contains a permission called 'ACCESS_LOCATION_EXTRA_COMMANDS'. Normal location commands would involve accessing coarse/fine location. Does anyone know what kind of extra commands this permission allows the app to access ?

Thanks.

3条回答
成全新的幸福
2楼-- · 2019-02-02 09:42

According to a rough search in Android source code, it indicate that LocationManager.sendExtraCommand() need this permission exactly.

Documentation: sendExtraCommand(java.lang.String, java.lang.String, android.os.Bundle)

查看更多
闹够了就滚
3楼-- · 2019-02-02 09:55

you can find additional information about 3 commands at google group discussions there were three command under discuss:

locationManager.sendExtraCommand("gps", "delete_aiding_data", null);
Bundle bundle = new Bundle();
locationManager.sendExtraCommand("gps", "force_xtra_injection", bundle);
locationManager.sendExtraCommand("gps", "force_time_injection", bundle);

it would be grate if anyone can say more about each extra

查看更多
forever°为你锁心
4楼-- · 2019-02-02 10:02

I only know of 1 command which can be uses when you have a slow GPS fix:

((LocationManager)YourActivity.this.getSystemService("location")).sendExtraCommand("gps", "delete_aiding_data", null);

and in the Manifest:

<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
查看更多
登录 后发表回答