package com.fxy.base;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;

import com.fxy.putIn.PutinPhotosMainActivity;

public class NetworkChangeReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {

        boolean noConnectivity = intent.getBooleanExtra(
                ConnectivityManager.EXTRA_NO_CONNECTIVITY, false
        );

        if (noConnectivity) {
            // 当前没有网络连接，执行相应的处理逻辑
        } else {
            // 网络连接已经恢复，执行相应的处理逻辑

        }
    }
}
