Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to receive ICS Wi-Fi hotspot enale/disable via broadcastreceiver

Tags:

android

wifi

I would like to know if we can receive information via broadcastreceiver (onReceive) to know that if user enable/disable "Portable Wi-Fi Hotspot" (Settings->Wireless &Networks->Tethering & portable hotspot).

Since I found that I am not able to use android.net.wifi.WifiManager to monitor this at ICE Cream version.

Does anyone can share some hints to me?

like image 279
user1713540 Avatar asked Nov 12 '22 14:11

user1713540


1 Answers

You can use action named "android.net.wifi.WIFI_AP_STATE_CHANGED" for monitoring state changes on WiFi-AP.

http://androidxref.com/4.0.4/xref/frameworks/base/wifi/java/android/net/wifi/WifiManager.java#132

like image 79
Jiyong Park Avatar answered Nov 15 '22 05:11

Jiyong Park