I'm trying to build an app for MDM using Android Management API. But I can't find an API to create a device id. How to get Device id for using Android Management API?
Asked
Active
Viewed 1,188 times
2
-
1Do you want to create an id or get the one from Android? – heX Apr 14 '20 at 03:23
-
1@heX I want to create an id when an app launches. – Hyeyeon Apr 14 '20 at 03:37
-
1You want to create an id and show it in the management api device payload? – heX Apr 14 '20 at 03:40
-
1@heX Yes. i want to send it to android mgmt api parameter. – Hyeyeon Apr 14 '20 at 03:48
-
1https://developers.google.com/android/management/reference/rest/v1/enterprises.devices You can add any number of `systemProperties` you want. However, the difficult part is knowing your Android Management Device name. Until Android 9, you can cross reference between the management data and your app using the serial number. After android 9, there's no easy way to cross reference. – heX Apr 14 '20 at 03:56
-
1Possible duplicate of: https://stackoverflow.com/questions/55236596/is-there-any-way-to-get-android-management-api-device-id-from-app/55251103#55251103 – anro Apr 27 '20 at 04:15
-
2Does this answer your question? [Is there any way to get Android Management API device id from app](https://stackoverflow.com/questions/55236596/is-there-any-way-to-get-android-management-api-device-id-from-app) – anro Apr 27 '20 at 04:16
-
I misunderstood Android mgmt API guide. Thanks for your help – Hyeyeon Apr 27 '20 at 07:37
1 Answers
0
The deviceId
is generated upon successful enrollment. You can list the devices using Devices.list after enrollment. The deviceId is stored in the name
field in the form enterprises/{enterpriseId}/devices/{deviceId}
you can check the Device resource for more info.

Kevin
- 321
- 2
- 19
-
-
1You need to have special permissions to do this. You can check this link for more info. https://developer.android.com/training/articles/user-data-ids – Kevin Jan 21 '21 at 21:50