我有以下BroadcastRecevier: public class WiFiConnectionEventsReceiver extends BroadcastReceiver {
private static final String TAG = WiFiConnectionEventsReceiver.class.getSimpleName();
@Override
我想知道手機何時與Wi-Fi失去連接。我知道我應該使用廣播接收器。所以我註冊的廣播接收器: intentFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
registerReceiver(wifiScanReceiver, intentFilter);
然後創建廣播接收器: public class WifiScanReceiv