当Wi-Fi连接正在重新启动时,是否只有广播意图与动作NETWORK_STATE_CHANGED_ACTION(其常量值为
android.net.wifi.STATE_CHANGE)是正常的?即当Wifi正在断开连接时,我没有这个意图.
更新:我最感兴趣的是> = 2.2 Froyo
解决方法
public static final String
SUPPLICANT_CONNECTION_CHANGE_ACTIONSince: API Level 1
Broadcast intent
action indicating that a connection to
the supplicant has been established
(and it is now possible to perform
Wi-Fi operations) or the connection to
the supplicant has been lost. One
extra provides the connection state as
a boolean,where true means CONNECTED.See Also
EXTRA_SUPPLICANT_CONNECTED
Constant Value: “android.net.wifi.supplicant.CONNECTION_CHANGE”
在android的API中,它表示,检查STATE_CHANGE网络连接不是一个好主意,而应该使用SUPPLICANT_CONNECTION_CHANGE_ACTION.这将注意到一个无线网络的建立,以及一个wifi网络的断开.我不知道这是否可以帮助你,但我也希望如此. LINK