4

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!

Fred
  • 2,191
  • 1
  • 12
  • 14
Florian
  • 235
  • 1
  • 11

1 Answers1

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
}
Fred
  • 2,191
  • 1
  • 12
  • 14
  • Hi Fred, thanks a lot for your answer. According to the documentation, the `lockTaskAllowed` setting is deprecated. Will it still work in the future? – Florian Sep 10 '19 at 04:26
  • Good point, there is no replacement for `lockTaskAllowed` at the moment for this use case. We'll make sure to offer a replacement before removing this field. – Fred Sep 13 '19 at 14:28
  • 2
    I've discussed with the team, the replacement for using `lockTaskAllowed` is to set `installType: KIOSK` for the web app, all other apps in the policy will be allowed in lock task mode, therefore Chrome just needs to be in the policy, ideally with `installType: FORCE_INSTALLED` to ensure it's present. – Fred Sep 20 '19 at 07:42
  • Thanks Fred, so I don't even need the `persistentPreferredActivities` settings anymore. – Florian Sep 20 '19 at 14:02
  • Hello - were you able to successfully get the above to launch in kiosk mode? I'm having trouble. Could you share what your final code ended up being if you got it to work? – Lauren Dec 08 '19 at 11:16
  • I compiled a question here in case you were able to get it sorted and are able to help: https://stackoverflow.com/questions/59235208/single-webapp-kiosk-mode-via-android-management-api – Lauren Dec 08 '19 at 12:07
  • @Fred how to enable the screen orientation (landscape mode) in kiosk mode? – maranR Jun 05 '23 at 13:17