android / enterprise-samples

Multiple samples showing the best practices in enterprise on Android.
Apache License 2.0
387 stars 241 forks source link

Device could not connect to Wifi on Android 9 When try to provision device with NFC beam What extra parameter should i use #26

Closed Johnny314 closed 1 year ago

zubairehman commented 4 years ago

I am facing the same issue. It just shows a dialog with a message that reads can't setup device could not connect to wifi

zubairehman commented 4 years ago

@Johnny314 you can use these params to pass WiFi info:

private Map<String, String> mProvisioningValues;

mProvisioningValues.put(DevicePolicyManager.EXTRA_PROVISIONING_WIFI_SSID, s);
mProvisioningValues.put(
                        DevicePolicyManager.EXTRA_PROVISIONING_WIFI_SECURITY_TYPE, s);
mProvisioningValues.put(DevicePolicyManager.EXTRA_PROVISIONING_WIFI_PASSWORD, s);