package com.itant.filetransfer;

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

public class NetworkStatusMonitor extends BroadcastReceiver {

	private static final String STATUS_HOT_SPOT = "android.net.wifi.WIFI_AP_STATE_CHANGED";
	
	@Override
	public void onReceive(Context context, Intent intent) {
		// 监听情况：	2.服务器端连接上热点
		String action = intent.getAction();
		switch (action) {
		case STATUS_HOT_SPOT:
			// 1.客户端（发送端）热点状态改变
			//Toast.makeText(context, "热点改变", Toast.LENGTH_SHORT).show();
			break;

		default:
			//Toast.makeText(context, "网络状态改变", Toast.LENGTH_SHORT).show();
			break;
		}
	}
}
