docs: private void processEvent(final Context context, final JSONObject event, final int eventType) {
          synchronized (eventLock) {
              try {
                  activityCount = activityCount == 0 ? 1 : activityCount;
                  String type;
                  if (eventType == Constants.PAGE_EVENT) {
                      type = "page";
                  } else if (eventType == Constants.PING_EVENT) {
                      type = "ping";
                      attachMeta(event, context);
                      if(event.has("bk")){
                          isBgPing = true;
                          event.remove("bk");
                      }
                  } else if (eventType == Constants.PROFILE_EVENT) {
                      type = "profile";
                  } else if (eventType == Constants.DATA_EVENT) {
                      type = "data";
                  } else {
                      type = "event";
                  }
  
                  // Complete the received event with the other params
  
                  String currentActivityName = getScreenName();
                  if (currentActivityName != null) {
                      event.put("n", currentActivityName);
                  }
  
                  int session = getCurrentSession();
                  event.put("s", session);
                  event.put("pg", activityCount);
                  event.put("type", type);
                  event.put("ep", System.currentTimeMillis() / 1000);
                  event.put("f", isFirstSession());
                  event.put("lsl", getLastSessionLength());
                  attachPackageNameIfRequired(context, event);
  
                  // Report any pending validation error
                  ValidationResult vr = popValidationResult();
                  if (vr != null) {
                      event.put(Constants.ERROR_KEY, getErrorObject(vr));
                  }
                  getLocalDataStore().setDataSyncFlag(event);
                  queueEventToDB(context, event, eventType);
                  updateLocalStore(context, event, eventType);
                  scheduleQueueFlush(context);
  
              } catch (Throwable e) {
                  getConfigLogger().verbose(getAccountId(), "Failed to queue event: " + event.toString(), e);
              }
          }
      }