code: public static AsyncInitializer asyncInit(final Callback<Void> callback) {
          activeFactoryBuilder = new AsyncFactoryBuilder(new Callback<TorchFactory>() {
              @Override
              public void onSuccess(TorchFactory factory) {
                  factoryInstance = factory;
                  callback.onSuccess(null);
              }
  
              @Override
              public void onFailure(Exception e) {
                  logger.error("Could not initialize database in background!", e);
                  callback.onFailure(e);
              }
          });
  
          return activeFactoryBuilder;
      }
docs: Using this method the database will get opened (or created if it doesn't yet exist) in background. In order to
  get all async callbacks delivered on UI Thread, you have to call this on UI Thread.
  
  @param callback will be called when database is opened or on failure, on UI thread
  
  @return Asynchronous initializer.