How to get wifi hotspot state

前端 未结 4 796
我寻月下人不归
我寻月下人不归 2021-01-06 00:54

I am creating wifi hotspot in my phone and I want get its state change event when I switched on or off hotspot.

4条回答
  •  南笙
    南笙 (楼主)
    2021-01-06 00:56

    You can monitor the wifi state with a BroadcastReciver. Here's an example of how to implement it: http://silverballsoftware.com/android-monitor-wifi-state-with-broadcastreceiver

提交回复
热议问题