// Path: opsxlib/src/main/java/com/zzzmode/appopsx/common/Actions.java
// public final class Actions {
// 
//   public static final String ACTION_SERVER_STARTED="com.zzzmode.appopsx.action.SERVER_STARTED";
//   public static final String ACTION_SERVER_CONNECTED="com.zzzmode.appopsx.action.SERVER_CONNECTED";
//   public static final String ACTION_SERVER_DISCONNECTED="com.zzzmode.appopsx.action.SERVER_DISCONNECTED";
//   public static final String ACTION_SERVER_STOPED="com.zzzmode.appopsx.action.SERVER_STOPED";
// }


import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import com.zzzmode.appopsx.common.Actions;
package com.zzzmode.appopsx;


/**
 * Created by zl on 2017/10/12.
 */

public class ServerStatusChangeReceiver extends BroadcastReceiver {

  private static final String TAG = "ServerStatusChangeRecei";

  @Override
  public void onReceive(Context context, Intent intent) {

    String token = intent.getStringExtra("token");

    if(SConfig.getLocalToken().equals(token)) {
      String action = intent.getAction();
      Log.e(TAG, "onReceive --> " + action + "   " + token + "  " + intent
          .getStringExtra("type"));

// Path: opsxlib/src/main/java/com/zzzmode/appopsx/common/Actions.java
// public final class Actions {
// 
//   public static final String ACTION_SERVER_STARTED="com.zzzmode.appopsx.action.SERVER_STARTED";
//   public static final String ACTION_SERVER_CONNECTED="com.zzzmode.appopsx.action.SERVER_CONNECTED";
//   public static final String ACTION_SERVER_DISCONNECTED="com.zzzmode.appopsx.action.SERVER_DISCONNECTED";
//   public static final String ACTION_SERVER_STOPED="com.zzzmode.appopsx.action.SERVER_STOPED";
// }


// Path: opsxpro/src/main/java/com/zzzmode/appopsx/ServerStatusChangeReceiver.java
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import com.zzzmode.appopsx.common.Actions;

package com.zzzmode.appopsx;


/**
 * Created by zl on 2017/10/12.
 */

public class ServerStatusChangeReceiver extends BroadcastReceiver {

  private static final String TAG = "ServerStatusChangeRecei";

  @Override
  public void onReceive(Context context, Intent intent) {

    String token = intent.getStringExtra("token");

    if(SConfig.getLocalToken().equals(token)) {
      String action = intent.getAction();
      Log.e(TAG, "onReceive --> " + action + "   " + token + "  " + intent
          .getStringExtra("type"));

      if (Actions.ACTION_SERVER_STARTED.equals(action)) {