且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用Android Management API在网络视图中设置白名单

更新时间:2023-12-04 20:05:10

您必须分别为每个应用设置黑名单/白名单.

You have to set the blacklist/whitelist for each app individually.

例如:

{
    "packageName": "com.jetblue.JetBlueAndroid",
    "managedConfiguration": {
        'com.android.browser:URLBlacklist': ['*'],
        'com.android.browser:URLWhitelist': ['jetblue.com']
    }
}

除了JetBlue.com之外,此代码还会阻止JetBlue应用程序中的所有域

This code blocks all domains within the JetBlue app besides for JetBlue.com

有些事情要注意: 1.注意不要阻止应用程序需要运行的任何域(包括登录页面等). 2.如果应用使用直接API而不是Web视图显示内容,则这些限制将不适用.

There are some things to be aware of: 1. Be careful not to block any domains the app needs to function (including login pages, etc.). 2. If an app uses a direct API to display content, not a web view, then these restrictions will not apply.