code: public void sendQueuedEventsAsync(final KeenProject project, final KeenCallback callback) {
  
          if (!isActive) {
              handleLibraryInactive(callback);
              return;
          }
  
          if (project == null && defaultProject == null) {
              handleFailure(null, new IllegalStateException("No project specified, but no default project found"));
              return;
          }
          final KeenProject useProject = (project == null ? defaultProject : project);
  
          // Wrap the asynchronous execute in a try/catch block in case the executor throws a
          // RejectedExecutionException (or anything else).
          try {
              publishExecutor.execute(new Runnable() {
                  @Override
                  public void run() {
                      sendQueuedEvents(useProject, callback);
                  }
              });
          } catch (Exception e) {
              handleFailure(callback, e);
          }
      }
docs: Asynchronously sends all queued events for the given project. This method will request that
  the Keen client's {@link java.util.concurrent.Executor} executes the publish operation.
  
  @param project  The project for which to send queued events. If a default project has been set
  on the client this parameter may be null, in which case the default project
  will be used.
  @param callback An optional callback to receive notification of success or failure.