Search code examples
iframegoogle-playsoftware-distributionandroid-management-api

How to distribute apps when SELECT button does nothing - Android Management API


I am building a console and have successfully rendered my iframe:

gapi.load('gapi.iframes', function() {
            var options = {
              'url': 'https://play.google.com/work/embedded/search?token=' + data + '&mode=SELECT',
              'where': document.getElementById('container'),
              'attributes': { style: 'width: 950px; height:500px', scrolling: 'yes'}
            }

However, when I select an app using the provided SELECT button, it only returns the expected payload. I assumed that the iframe would do the heavy lifting here but now know that I need to build the logic. Can someone point me in the rightt direction here for approving the app via SELECT button? Is there a set of iframe events that I should be writing this with in mind? I'm completely lost since documentation here https://developers.google.com/android/management/apps#select-button_1 is extremely vague. Has anyone had issues with this before?

Thanks!


Solution

  • The documentation for the select button indicates that “You need to specify the action that takes place when the IT admin clicks this button”. It is up to the EMM to decide what to do next. You could prompt the user to approve the app on play.google.com/work

    For example, you need to approve dropbox. You need to login with your enterprise account then go to this link https://play.google.com/work/apps/details?id=com.dropbox.android and then approve the app.

    enter image description here

    Or you could prompt the user to add the application to a policy, which automatically approves the app for use by the user’s enterprise.

    You may refer to this link for more information about handling iframe events.