Skip to main content
Level 1.5: Cupcake
October 25, 2023
Solved

Need Help with Android Enterprise Location Fetching Issue

  • October 25, 2023
  • 1 reply
  • 1 view

Hello  Android Enterprise Community,

 

I'm reaching out to seek assistance with a location-related issue I'm currently facing. I've been struggling to fetch location information on a device, even after applying the following policy settings:

 "locationMode": "LOCATION_ENFORCED", "shareLocationDisabled": false .

I've ensured that these policies are correctly configured and applied to the device in question. However, I'm still unable to retrieve any information regarding the device's location using the device.get method.

I've double-checked my policies and even waited for some time to allow for the policy to take effect, but it doesn't seem to be working as expected.

 

Here are a few additional details that might be relevant:

  • I'm working in an Android Enterprise environment.
  • The device I'm testing on is compliant with the policies I've set.
  • The app I'm developing has the necessary permissions for location access.

I'm unsure why I'm not able to fetch location data despite the policy settings. If anyone has encountered a similar issue or has insights into what might be causing this problem, I'd greatly appreciate your guidance and suggestions.

 

I've gone through the Android Enterprise documentation, but I'm still unable to pinpoint the root of the issue. Any help or advice you can provide would be of immense assistance to me in resolving this matter.

Thank you for taking the time to read my query, and I look forward to hearing from you and benefiting from your expertise.

 

Best regards,

Rajiv Ranjan.

 
 
Best answer by jeremy

Hello,

Have the Android Management API will not let you retrieve the device location. If you want to retrieve the device location you have to create your own app to do that, the policy will only allow to enforce permissions for apps sharing the location.

 

You have 2 options here:

  • Develop your application and share the location from this app based on your need to your server
  • Use the device lost mode, the documentation is available here

1 reply

jeremyAnswer
Level 1.6: Donut
October 25, 2023

Hello,

Have the Android Management API will not let you retrieve the device location. If you want to retrieve the device location you have to create your own app to do that, the policy will only allow to enforce permissions for apps sharing the location.

 

You have 2 options here:

  • Develop your application and share the location from this app based on your need to your server
  • Use the device lost mode, the documentation is available here
Level: 4.1: Jelly bean
October 25, 2023

^ This is the answer, but I can't mark it as such @Lizzie