Android Access_location_extra_commands Permission Uses
Solution 1:
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-permissionandroid:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
Solution 2:
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)
Solution 3:
Go to https://cs.android.com/android/platform/superproject/+/master:frameworks/base/services/core/java/com/android/server/location/provider/AbstractLocationProvider.java;drc=master;bpv=1;bpt=1;l=353, click on onExtraCommand
if you don't see the "References" panel at the bottom, scroll down to "Overriden By", and click on each implementation to see what commands it supports.
Here's a list of commands supported by GnssLocationProvider (since all of the other implementations seem to do nothing or delegate to another one):
delete_aiding_data
: callsdeleteAidingData
force_time_injection
: callsrequestUtcTime
force_psds_injection
: sends aDOWNLOAD_PSDS_DATA
message ifmSupportsPsds
is truerequest_power_stats
: callsrequestPowerStats
Post a Comment for "Android Access_location_extra_commands Permission Uses"