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

别来无恙 提交于 2020-01-02 09:55:39

问题


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
}  


来源:https://stackoverflow.com/questions/49339245/android-cosu-single-app-lock-for-browser-and-just-one-web-app-on-gadgets

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