我的应用程序想知道数据是否已启用。那是当用户启用数据(Click the Settings->Data Manager->Data Delivery->Data Enabled
)时,系统发出的broadcast
消息的名称是什么?
非常感谢。
答案 0 :(得分:1)
action:android.net.conn.CONNECTIVITY_CHANGE
http://www.androidjavadoc.com/1.0_r1_src/android/net/MobileDataStateTracker.html
MobileDataStateTracker
(149):默认收到状态= DISCONNECTED,old = CONNECTED,reason = dataDisabled,apnTypeList = default,supl
http://www.androidjavadoc.com/1.1_r1_src/android/net/NetworkStateTracker.html
NetworkStateTracker
(149):setDetailed状态,old = CONNECTED和新状态= DISCONNECTED
http://www.devdaily.com/java/jwarehouse/android/services/java/com/android/server/ConnectivityService.java.shtml
ConnectivityService
(149):移动设备的ConnectivityChange:已断开连接/已断开连接
ConnectivityService(149):getMobileDataEnabled
返回true
希望它有助于升技