android turning on wifi programmatically

前端 未结 2 467
再見小時候
再見小時候 2020-12-08 23:37

I am trying to turn add a wifi network programmatically and to connect to that network.

My code works fine if the wi-fi is already turned on.

If wi-fi is off

2条回答
  •  渐次进展
    2020-12-09 00:29

    You need to create wifiLock with wifi mode_full, a bit strange name for that method but doing the work.

提交回复
热议问题