Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stuck on "Connecting to WiFi" screen while provisioning Android Lollipop device

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?

like image 454
user2478004 Avatar asked Mar 12 '15 07:03

user2478004


2 Answers

You need to surround SSID with double quotes : p.setProperty(DevicePolicyManager.EXTRA_PROVISIONING_WIFI_SSID, "\"my SSI\"");

like image 110
earlypearl Avatar answered Oct 01 '22 11:10

earlypearl


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.

like image 34
Punkman Avatar answered Oct 01 '22 11:10

Punkman