android COSU single app - lock for browser and just one web-app on gadgets

时光毁灭记忆、已成空白 提交于 2019-12-06 12:33:56

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