android COSU single app - lock for browser and jus

2019-05-29 01:16发布

问题:

I'm not experienced with Android. I want to setup some tablets in such a way, that the gadgets are locked to just one web-app. I think it should be somehow locked to a Browser (which in turn should open directly after the launch of the tablet with the login page of the web-app set as default) and the browser should be locked to a particular web-app/ set of urls.

Can somebody recommend tools/ resources or solutions for my purpose?

I am sure the task itself is not a big deal and I am searching for a solution to keep it as simple as possible without investing to much time to learn or to develop a special webView app for that purpose.

回答1:

You can use the Android Management API to set up a device locked on the Chrome browser and configure Chrome to be locked on a single website, the policy JSON below does just that. To set up a device you can follow the quick start guide.

Here is a policy to lock a device on Chrome and restrict Chrome to stackoverflow.com:

{
  "applications": [
    {
      "packageName": "com.android.chrome",
      "installType": "FORCE_INSTALLED",
      "managed_configuration": {
        "URLBlacklist": ["*"],
        "URLWhitelist": ["stackoverflow.com"]
      },
      "lockTaskAllowed": true,
      "defaultPermissionPolicy": "GRANT"
    }
  ],
  "persistentPreferredActivities": [
    {
      "receiverActivity": "com.android.chrome",
      "actions": [
        "android.intent.action.MAIN"
      ],
      "categories": [
        "android.intent.category.HOME",
        "android.intent.category.DEFAULT"
      ]
    }
  ],
  "statusBarDisabled": true
}