1

I am trying to create hotspot programatically, unfortunately its not working in android lollipop.

For previous android version I was using "setWifiApEnabled" using reflection and it works fine.

I am struggling on this for a while now, any help would be great.

tushars
  • 157
  • 7
  • try [this](http://stackoverflow.com/questions/7221712/cant-set-wificonfiguration-when-enabling-wifi-hotspot-using-setwifiapenabled) – Pranit Bankar Jan 31 '15 at 09:08

1 Answers1

0

Worked after adding the permission :)

<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
tushars
  • 157
  • 7
  • Any chance you can post more info? I tried this solution, but it did NOT work for me, i get does not have permission CONNECTIVITY_INTERNAL in the stacktrace. I am on android 5.0.1 – Nick Oct 24 '15 at 01:13
  • Did not work for me as well, running 5.1.1 on Samsung SM G920A (S6). Same permission issue "CONNECTIVITY_INTERNAL", guess support has been removed for non-system apps? – vman Nov 03 '15 at 08:10
  • @tushars do you mind giving us the model #, carrier, and os versions (e.g. SM-G920A, AT&T, 5.0.1/5.1.1) you found this working on? Maybe it is not working on certain lollipop devices – vman Nov 03 '15 at 17:52
  • it was Samsung Galaxy S4 I9500 running on 5.0.1 – tushars Nov 04 '15 at 09:06