Get details from Android Device Policy after enrolment via Android Management API using flutter

387 Views Asked by At

I enroll a fully-managed device with Android Management API using qrCode.

After enrollment, I want to get any kind of detail of enrolmentToken or qrCode that was used to enroll the device, so I can ping my server of the details and update the database accordingly.

I want to implement this in flutter framework.

2

There are 2 best solutions below

0
Gautam Bhateja On BEST ANSWER

This thing can be done by implementing pub/sub in which I can subscribe every enterprise to a certain topic and allow ENROLLMENT notification which listens for such notifications.

0
Rey V. Aquino On

To identify which enrollment token an admin used during device provisioning, you can use the devices.get method. When using this method, the following fields will provide relevant information about the token:

Additionally, you can also use enrollmentTokens.get to get more information about the enrollment used. This method gets an active, unexpired enrollment token, and only a partial view of EnrollmentToken is returned (all the fields but name and expirationTimestamp are empty).