protected void initBaseValue(BaseFragmentLayout layout) {
   mBaseFragmentLayout = layout;
   mToolbar = layout.getToolbar();
   if (mReceiver == null) {
     registerBroadcast();
   }
   if (mContext == null) {
     mContext = getActivity();
   }
   if (mResouce == null) {
     mResouce = mContext.getResources();
   }
   if (mScreenControl == null) {
     mScreenControl = ScreenControl.getInstance();
   }
   if (mPopup == null) {
     mPopup = new Popup(getActivity());
   }
   if (mToastPopup == null) {
     mToastPopup = new ToastPopup(getActivity());
   }
   if (mUserDataProvider == null) {
     mUserDataProvider = UserDataProvider.getInstance(getActivity());
   }
   if (mDeviceDataProvider == null) {
     mDeviceDataProvider = DeviceDataProvider.getInstance(getActivity());
   }
   if (mDoorDataProvider == null) {
     mDoorDataProvider = DoorDataProvider.getInstance(getActivity());
   }
   if (mEventDataProvider == null) {
     mEventDataProvider = EventDataProvider.getInstance(getActivity());
   }
   if (mAccessGroupDataProvider == null) {
     mAccessGroupDataProvider = AccessGroupDataProvider.getInstance(getActivity());
   }
   if (mAccessLevelDataProvider == null) {
     mAccessLevelDataProvider = AccessLevelDataProvider.getInstance(getActivity());
   }
   if (mPermissionDataProvider == null) {
     mPermissionDataProvider = PermissionDataProvider.getInstance(getActivity());
   }
   if (mCommonDataProvider == null) {
     mCommonDataProvider = CommonDataProvider.getInstance(getActivity());
   }
   if (mPushDataProvider == null) {
     mPushDataProvider = PushDataProvider.getInstance(getActivity());
   }
   if (mTimeConvertProvider == null) {
     mTimeConvertProvider = TimeConvertProvider.getInstance(getActivity());
   }
   if (mImm == null) {
     mImm = (InputMethodManager) mContext.getSystemService(mContext.INPUT_METHOD_SERVICE);
   }
 }
  @Override
  public void onReceive(Context context, Intent intent) {
    if (BuildConfig.DEBUG) {
      Log.i(TAG, "========push receiver start =========");
    }

    Bundle bundle = intent.getExtras();
    if (bundle == null) {
      setResultCode(Activity.RESULT_OK);
      return;
    }

    if (REGISTER_RESPONSE_ACTION.equals(intent.getAction())) {
      String registrationId = intent.getStringExtra("registration_id");
      Log.e(TAG, "registered:" + registrationId);
      if ((registrationId != null) && (registrationId.length() > 0)) {
        PreferenceUtil.putSharedPreference(context, "registrationId", registrationId);
      }
      PackageInfo packageInfo;
      try {
        packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
        PreferenceUtil.putSharedPreference(context, "version", packageInfo.versionCode);
      } catch (NameNotFoundException e) {
        e.printStackTrace();
      }

      PushDataProvider pushDataProvider = PushDataProvider.getInstance(context);
      pushDataProvider.setNeedUpdateNotificationToken(registrationId);
      ComponentName comp =
          new ComponentName(context.getPackageName(), GcmIntentService.class.getName());
      startWakefulService(context, intent.setComponent(comp));
      setResultCode(Activity.RESULT_OK);
      if (BuildConfig.DEBUG) {
        Log.i(TAG, "========push receiver end =========");
      }
      return;
    }
    PushNotification noti = null;
    for (String key : bundle.keySet()) {
      String value;
      value = (String) bundle.get(key);
      if (value == null) {
        continue;
      }
      if (key.equals("CMD") && value.equals("RST_FULL")) {
        if (BuildConfig.DEBUG) {
          Log.e(TAG, "RST_FULL");
        }
        int registeredVersion = PreferenceUtil.getIntSharedPreference(context, "version");
        if (registeredVersion > 0) {
          registeredVersion--;
        }
        PreferenceUtil.putSharedPreference(context, "version", registeredVersion);
        Intent intentBoradCast = new Intent(Setting.BROADCAST_PUSH_TOKEN_UPDATE);
        LocalBroadcastManager.getInstance(context).sendBroadcast(intentBoradCast);
        return;
      }
      String code = null;
      if (key.equals(NotificationType.DEVICE_REBOOT.mName)) {
        code = NotificationType.DEVICE_REBOOT.mName;
      } else if (key.equals(NotificationType.DEVICE_RS485_DISCONNECT.mName)) {
        code = NotificationType.DEVICE_RS485_DISCONNECT.mName;
      } else if (key.equals(NotificationType.DEVICE_TAMPERING.mName)) {
        code = NotificationType.DEVICE_TAMPERING.mName;
      } else if (key.equals(NotificationType.DOOR_FORCED_OPEN.mName)) {
        code = NotificationType.DOOR_FORCED_OPEN.mName;
      } else if (key.equals(NotificationType.DOOR_HELD_OPEN.mName)) {
        code = NotificationType.DOOR_HELD_OPEN.mName;
      } else if (key.equals(NotificationType.DOOR_OPEN_REQUEST.mName)) {
        code = NotificationType.DOOR_OPEN_REQUEST.mName;
      } else if (key.equals(NotificationType.ZONE_APB.mName)) {
        code = NotificationType.ZONE_APB.mName;
      } else if (key.equals(NotificationType.ZONE_FIRE.mName)) {
        code = NotificationType.ZONE_FIRE.mName;
      }
      if (code != null) {
        PushNotification tempNoti = NotificationBuild(value, code, context);
        if (tempNoti != null) {
          noti = tempNoti;
        }
      }

      if (BuildConfig.DEBUG) {
        Log.i(
            TAG,
            "|"
                + String.format("%s : %s (%s)", key, value.toString(), value.getClass().getName())
                + "|");
      }
    }

    if (noti != null) {
      Notification(noti, context);
    }

    ComponentName comp =
        new ComponentName(context.getPackageName(), GcmIntentService.class.getName());
    startWakefulService(context, intent.setComponent(comp));
    setResultCode(Activity.RESULT_OK);
    if (BuildConfig.DEBUG) {
      Log.i(TAG, "========push receiver end =========");
    }
  }