I am trying to auto connect with WiFi when provisioning Android Lollipop device using below NFC tags:
p.setProperty(DevicePolicyManager.EXTRA_PROVISIONING_WIFI_SSID, "-----");
p.setProperty(DevicePolicyManager.EXTRA_PROVISIONING_WIFI_PASSWORD, "----");
It seems it is getting connected with WiFi but stuck on Connecting to Wi-fi...
Screen and it is not finishing with provisioning process.
Can anybody guide me to resolve this issue?
You need to surround SSID with double quotes : p.setProperty(DevicePolicyManager.EXTRA_PROVISIONING_WIFI_SSID, "\"my SSI\"");
To make it work I had to set the also the flag android.app.extra.PROVISIONING_WIFI_SECURITY_TYPE
.
Specify only the two EXTRA
for SSID and PASSWORD as stated in the docs isn't enough. Probably the default security type remains NONE
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With