I'm updating an Android app which performs Android EMM along with our web app. From within our Android app, is there a way for me to get the Android device's productPolicy?
What's a productPolicy? Google shut down the old mechanism for distributing apps via EMM, and now to distribute apps, an EMM service (i.e. our web application) needs to make an api call to Devices: update with a device object in the request body. The device object has a member policy.productPolicy which is an array of objects corresponding to apps which the EMM service wants to install/update/configure on the targeted Android device. The information I want our Android app to obtain is the productId for each app specified in the productPolicy.
I don't know for certain that this information is on the Android device, but I suspect that after our web application sends this information to Google's api, Google passes some of it forward to the Android device because I observe that the apps which I specify in my productPolicy auto-install successfully after making this api request to Google.