Search code examples
androidandroid-management-apidevice-policy-manager

Automate WiFi setup during device provisioning Android MGMT API


I am using the Android Management API to deploy fully managed devices - I create policies for each of my tablets, and they are provisioned via QR codes. I have recently added an openNetworkConfiguration to my policies. I was under the assumption that the purpose of this is to auto connect to a network upon provisioning. Am I mistaken with this?

I tested this with my home WiFi. The values I entered in to the policy are valid as far as the required parameters, as the MGMT API will not let invalid settings get through... and I know my own WiFi credentials. So why would the openNetwworkConfiguration I have provided not connect me to the WiFi automatically after I have scanned a QR code for my device?


Solution

  • Your policy will only be applied after the provisioning of your device, meaning when you factory reset your device and scan the qr , the policy is not yet applied on your device, it will be applied after connecting to a network and completing the initial setup.

    Once provisioned (after the initial setup), then the policy for openNetwworkConfiguration will be applied on your device. Wifi connection information can be included as part of the provisioning QR code. The available options for provisioning using a QR code are listed here.

    To connect to a WiFi connection during device setup/provisioning, you would need to include (minimally) the SSID and Password information. Please keep in mind that the data within the QRCode can be obtained using a simple QR reader application. By including this information, the customer would be exposing their wifi password publicly to anyone with the QR code.

    You can check the quick start guide to learn more about the process of provisioning devices.