tushars tushars - 25 days ago 10
Android Question

Android lollipop hotspot programatically not working?

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.

Answer

Worked after adding the permission :)

<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />