How to enable kiosk mode for a web app in the Android Management API

倖福魔咒の 提交于 2020-02-02 11:07:18

问题


One of our customers wants to enable the single kiosk mode with a web app. When we apply this configuration, it doesn't work: the web app is not displayed, and the device is not usable (even if the Chrome app is installed).

When the kiosk mode is disabled, the web app is perfectly usable. So I guess there is an issue on the AMAPI side.

Here is the application data of the profile:

"applications": [
   {
     "packageName": "com.google.enterprise.webapp.<generated-id>",
     "installType": "KIOSK",
     "defaultPermissionPolicy": "GRANT"
   }
  ],

Thanks a lot in advance for you help!


回答1:


To enable kiosk mode for a web app you need to set installType: KIOSK for the web app and also add Chrome in the policy with installType: FORCE_INSTALLED. This is because the web app links to Chrome. See below an example of how the policy should look like.

Note that in this example the policy also restricts accessible URLs via a managed configuration, which is often required for web app kiosks. The managed configuration is set for Chrome and applies to the web app as well since the web app is rendered by Chrome.

{
  "applications": [
    {
      "packageName": "com.android.chrome",
      "installType": "FORCE_INSTALLED",
      "managed_configuration": {
        "URLBlacklist": ["*"],
        "URLWhitelist": ["en.m.wikipedia.org"]
      },
      "defaultPermissionPolicy": "GRANT"
    },
    {
      "packageName": "com.google.enterprise.webapp.x7206d5dbf82b6e3f",
      "installType": "KIOSK",
      "defaultPermissionPolicy": "GRANT"
    }
  ],
  "statusBarDisabled": true,
  "keyguardDisabled": true
}


来源:https://stackoverflow.com/questions/57852063/how-to-enable-kiosk-mode-for-a-web-app-in-the-android-management-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!