I was following guide mentioned here https://developers.google.com/zero-touch/guides/customer/emm#provision to prepare a JSON which then I can scan and enroll device to our MDM provider.
Here is my sample 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"
}
When I am converting this JSON to QR code and scanning device, it is able to switch wifi, but probably not able to configure Proxy. I am seeing wifi with no internet icon in notification bar. I cannot actually confirm whether proxy is configured or not because device gets stuck at Downloading the admin app
screen.
However, when I tried with a wifi without proxy and it worked fine with that. Can somebody please tell me what am I doing wrong with proxy?
Device is running Android 7.0 Nougat.
Thanks
Sorry guys, https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#EXTRA_PROVISIONING_WIFI_PROXY_PORT link says that data type is String so I tried to use port number as string.
Changed it to integer and it works now.