7

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?

kash
  • 830
  • 2
  • 7
  • 19
user2478004
  • 101
  • 5

4 Answers4

3

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

earlypearl
  • 596
  • 6
  • 10
2

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.

Punkman
  • 554
  • 6
  • 15
1

Yes, it's broken in L MR0 (Android 5.0).

However, it's my experience that it has been fixed in L MR1 (Android 5.1).

It works for us now (I work at Sony Mobile).

The fix went into ManagedProvisioning git: https://android.googlesource.com/platform/packages/apps/ManagedProvisioning/

Marek Pola
  • 200
  • 1
  • 10
0

I've tried several things without success. The feature seems broken.

You should probably enter the WiFi info manually.

Hartok
  • 2,147
  • 20
  • 37