0

我按照此处提到的指南https://developers.google.com/zero-touch/guides/customer/emm#provision准备了一个 JSON,然后我可以扫描并将设备注册到我们的 MDM 提供商。

这是我的示例 JSON

{
"android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME": "sample-component-name",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM": "device admin signature",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION": "http://download/location/that.apk",
"android.app.extra.PROVISIONING_SKIP_ENCRYPTION": false, 
"android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE": {
    "serverurl": "my-mdm.server.url", 
    "gid": "testGid", 
    "un":"testUn",
    "pw":"testPass"
},
"android.app.extra.PROVISIONING_WIFI_SSID": "wifi-ssid",
"android.app.extra.PROVISIONING_WIFI_PASSWORD": "correct-password",
"android.app.extra.PROVISIONING_WIFI_PROXY_HOST": "my-wifi.proxy.host.url",
"android.app.extra.PROVISIONING_WIFI_PROXY_PORT": "9999"
}

当我将此 JSON 转换为 QR 码和扫描设备时,它能够切换 wifi,但可能无法配置代理。我在通知栏中看到没有互联网图标的 wifi。我实际上无法确认是否配置了代理,因为设备卡在Downloading the admin app屏幕上。

但是,当我尝试使用没有代理的 wifi 时,它工作得很好。有人可以告诉我代理做错了什么吗?

设备运行的是 Android 7.0 Nougat。

谢谢

4

1 回答 1

0

对不起,https ://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#EXTRA_PROVISIONING_WIFI_PROXY_PORT链接说数据类型是字符串,所以我尝试使用端口号作为字符串。

将其更改为整数,现在可以使用。

于 2018-02-02T18:13:01.327 回答