Esper Device SDK: Retrieving Device UUID Programmatically vs. Manual Managed Configuration Entry
Android
Title: Retrieve device UUID via Esper Device SDK — programmatic vs. manualWhen building an Android application managed by Esper, you need a reliable way to identify the device your app is running on. Manually entering a UUID for each device through Managed Configurations is error-prone at scale; the Esper Device SDK lets your app retrieve the UUID directly in code, with no per-device configuration required.
Why this happens
Every enrolled device is assigned a unique UUID by Esper at provisioning time. Without the SDK, the only way to surface that UUID to your app is through Managed Configurations, which must be set individually per device. The getEsperDeviceInfo() API reads the UUID from the Esper Agent running on the device, making the value available to your app at runtime without any manual input.
Retrieve the device UUID programmatically
- Confirm SDK and agent compatibility before integrating. The Esper Device SDK version must be compatible with both your target Android API level and the version of Esper Agent deployed on your devices. Check the minimum version requirements in the Esper Developer Documentation before proceeding.
- Add the Esper Device SDK as a dependency in your Android application. Follow the integration steps in the Esper Developer Documentation for your build system (Gradle or Maven).
-
Call
getEsperDeviceInfo()within your application code. This API queries the Esper Agent on the device and returns the Esper-assigned UUID for that device. Use the returned UUID as your device identifier in any application logic that requires it. -
Verify the returned UUID against the Esper Console. Navigate to Devices & Groups → [Device Name] → Device Info and confirm the UUID shown there matches the value returned by
getEsperDeviceInfo()at runtime.
Verify: The UUID returned by getEsperDeviceInfo() should exactly match the device UUID shown under Devices & Groups → [Device Name] → Device Info in the Esper Console immediately after the call is made. If the values match, no further configuration is needed.
Choosing between GMS and non-GMS devices
GMS (Google Mobile Services) certification determines whether a device can run Google-dependent APIs and services. This is a hardware-level property set by the manufacturer — it cannot be added to a device after purchase. Use the criteria below to select the right hardware before procurement.
- Your app uses Google services (Firebase, Google Analytics, Google Play Services, etc.): Select GMS-certified hardware. Non-GMS devices cannot support these services, and this requirement cannot be worked around in software.
- Google services may be needed in the future: Choose GMS-certified hardware now. Replacing a fleet of non-GMS devices later solely to gain GMS support is costly and avoidable.
- Google services are not required: Either GMS or non-GMS devices are suitable. Esper provisioning, enrollment, Blueprint application, and remote management work identically on both.
Confirm GMS certification status with your hardware vendor before purchasing. This information is not always clearly labeled in retail or distributor listings.
If this doesn't resolve it
If getEsperDeviceInfo() returns null or throws an error, collect the following before contacting support:
- The exact Esper Device SDK version integrated in your app
- The Android API level of the target device
- The Esper Agent version installed on the device, visible under Devices & Groups → [Device Name] → Device Info
- The full stack trace or error output from your application logs
Contact Esper Support with these details so the issue can be diagnosed without delay.
Still need help?
If you're still unable to retrieve your device UUID or configure it manually through the Esper console, please submit a support ticket and include your device serial number, the SDK version you're using, and whether you attempted programmatic retrieval, manual entry, or both.
Please sign in to leave a comment.
Comments
0 comments