code: private void activityResumed(Activity activity) {
          getConfigLogger().verbose(getAccountId(), "App in foreground");
          checkTimeoutSession();
          if(!isAppLaunchPushed()) {
              pushAppLaunchedEvent();
              onTokenRefresh();
          }
          if (!inCurrentSession()) {
              //onTokenRefresh();
              pushInitialEventsAsync();
          }
          checkPendingInAppNotifications(activity);
      }
docs: Lifecycle