Location Tracking on Esper-Managed Devices: Real-Time vs. Periodic — Capabilities and API Workaround
Android
Esper provides periodic location snapshots for your managed Android devices, but does not offer continuous real-time location tracking through the Esper Console. This article explains what location data is available and how to use the Device Status API to poll location information at regular intervals.
Understanding Esper's location tracking capabilities
Esper captures device location as part of periodic device status events. You can retrieve the most recent location snapshot on demand using the Device Status API, but the platform does not include a live-tracking map view or automatic continuous GPS broadcast feature.
If your use case requires true real-time GPS streaming at intervals shorter than 10 seconds, you'll need to deploy a dedicated GPS tracking application (such as a custom APK or third-party telematics app) managed through Esper Apps & Configuration. That application would handle live location reporting independently of Esper.
Before you begin
To retrieve location data via the Device Status API, you'll need:
- Your tenant name
- Your enterprise ID (found in Console → Enterprise Settings)
- The device ID (found in Devices & Groups → [Device Name] → Device Info)
- A valid API key (generate one at Console → API Key Management)
Also verify that location permissions are enabled in your active Blueprint:
- Go to Blueprints → [Blueprint Name] → Device Settings → Location
- Confirm that location mode is set to High Accuracy or Battery Saving
- Verify the Blueprint has been applied to your device
Step 1: Call the Device Status API
Make a GET request to retrieve the device's most recent location data:
GET https://{tenant_name}-api.esper.cloud/api/enterprise/{enterprise_id}/device/{device_id}/status/?latest_event=1 Replace the placeholders with your actual tenant name, enterprise ID, and device ID. Include your API key in the request headers for authentication.
Step 2: Parse the location data
A successful response returns HTTP 200 with a JSON body containing the device status, including a location object with latitude, longitude, and timestamp fields. Extract these values from the response.
Step 3: Set up automated polling
To approximate real-time tracking, schedule the API call at your desired polling interval using an external tool:
- Set up a cron job on your server
- Use an automation platform or workflow tool (Zapier, n8n, etc.)
- Write a custom script in your preferred language
Common polling intervals are 30–60 seconds, though you can adjust based on your needs and API rate limits.
Troubleshooting
Location field is null or absent:
- Confirm location permissions are enabled in your Blueprint as described in "Before you begin"
- Verify the device is online via Devices & Groups → [Device Name] → Overview
Location data is outdated:
- If your device has been offline, the API returns the last known location from the most recent check-in, not current data
- Check device connectivity status in the Esper Console
Location accuracy is poor:
- Location accuracy depends on device hardware, the location mode enabled in your Blueprint, and whether the device has cellular or Wi-Fi signal for assisted GPS
You need true real-time GPS streaming:
- Deploy a dedicated GPS tracking application (custom APK or third-party telematics app) managed via Esper Apps & Configuration
- This application handles live location reporting independently of Esper's periodic polling
Privacy and compliance considerations
If you're implementing location tracking for workforce monitoring or compliance purposes, ensure your solution complies with local privacy regulations such as GDPR and CCPA. Review your organization's privacy policies and legal requirements before deployment.
Still need help?
If you'd like to request real-time location tracking as a feature, or need assistance implementing the API workaround contact Esper Support. Include details about your use case and required update frequency.
Please sign in to leave a comment.
Comments
0 comments