You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过Android Management API配置网页Kiosk并解决persistentPreferredActivities合规错误

Fixing "persistentPreferredActivities 4" Error in Android Management Kiosk Web App

I've run into this exact issue before when setting up a web-based Kiosk app on fully managed Android devices. The INVALID_VALUE error tied to persistentPreferredActivities happens because your current policy creates a conflict between the Kiosk web app and the force-installed Chrome configuration. Here's how to resolve it:

Why This Error Occurs

When you mark a web app as KIOSK type, the Android Management API automatically sets it as the device's persistent preferred activity. But by force-installing Chrome with URL black/whitelist rules, you're creating a conflict—the system can't resolve which activity should take priority for web-related actions, triggering the "persistentPreferredActivities 4" error.

Solution Steps

Web apps deployed via the Android Management API already use the device's built-in Chrome engine, so you don't need to explicitly install Chrome. Removing this entry eliminates the activity conflict entirely:

"applications": [
  {
    "packageName": "com.google.enterprise.webapp.<my-webapp-id>",
    "installType": "KIOSK",
    "defaultPermissionPolicy": "GRANT"
  }
]

2. If You Must Keep Chrome (Not Ideal for Kiosk Mode)

If you have a specific requirement to have Chrome installed alongside the kiosk web app, adjust its configuration to avoid conflicting with the kiosk app's preferred activity:

  • Change Chrome's installType to AVAILABLE instead of FORCE_INSTALLED
  • Remove the URLBlacklist and URLWhitelist settings from Chrome's managed configuration (web app access restrictions should be handled via the web app's own settings or core kiosk policy)

Modified policy example:

"applications": [
  {
    "packageName": "com.google.enterprise.webapp.<my-webapp-id>",
    "installType": "KIOSK",
    "defaultPermissionPolicy": "GRANT"
  },
  {
    "packageName": "com.android.chrome",
    "installType": "AVAILABLE",
    "defaultPermissionPolicy": "GRANT"
  }
]

3. Re-Deploy the Updated Policy

After adjusting your policy JSON, re-apply it to the device. The compliance error should disappear, and the kiosk web app will launch correctly as the device's default persistent activity.

内容的提问来源于stack exchange,提问作者CSimpson

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.29 01:19:06