当我的BroadcastReceiver直接接收到WIFI_STATE_ENABLED时,WifiInfo的SSID值为空。但是,当我添加一个800毫秒的Thread.Sleep()时,它就可以工作了。在连接wifi和实际获取信息的WifiInfo对象的事件中似乎有延迟。下面的代码片段可以正常工作:
else if (intent.getAction().equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) {int ex
我在BackgroundTransferService文档中注意到了这一段:
This property allows applications to request that background transfers proceed when only a cellular connection is available and when the device is on battery power. This is only a preference setting. It does not guarantee that transfers will take place under th