'Get location details using Android Management API
I'm new to Android Management API and I'm unable to figure out how to get the location details using Android Management API. I have tried updating policy as such :
policy_json = '''
{
"applications": [
{
"packageName": "com.google.samples.apps.iosched",
"installType": "FORCE_INSTALLED",
"permissionGrants": [
{
"permission": "android.permission.ACCESS_FINE_LOCATION",
"policy": "GRANT"
}
}
],
"locationMode": "HIGH_ACCURACY"
}
'''
But I don't seem to have gotten the location details. Can anybody please help me through? Thank you!
Solution 1:[1]
The value HIGH_ACCURACY is only available in Android 8 or below. If you are using Android 9 or above, you should use LOCATION_ENFORCED instead.
Additionally, please note that locationMode only works on company owned devices.
Please refer to this link for more information.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | rsiason |
