package com.basic.security.receiver; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.text.TextUtils; import com.basic.security.utils.Constants; public class WebRtcBroadCastReceiver extends BroadcastReceiver { public static boolean webRtcServerStarted = false; public static boolean webRtcClientConnected = false; @Override public void onReceive(Context context, Intent intent) { String type = intent.getStringExtra("type"); if (!TextUtils.isEmpty(type)) { if (Constants.webRtcServerStarted.equals(type)) { webRtcServerStarted = true; } if (Constants.webRtcClientConnected.equals(type)) { webRtcClientConnected = true; } } // System.out.println("WebRtcBroadCastReceiver.onReceive " + intent + " type= " + type); // String intent.getStringExtra(""); } }