code: public boolean export(Context context, Class<?> spaceClass, String accessToken) {
      successful = false;
      final SpaceHelper helper = crateSpaceHelper(spaceClass);
      final String outputPath = createOutputPath(helper);
  
      final CountDownLatch countDownLatch = new CountDownLatch(1);
  
      final Vault vault = Vault.with(context, spaceClass);
      vault.requestSync(
          SyncConfig
              .builder()
              .setSpaceId(helper.getSpaceId())
              .setAccessToken(accessToken)
              .build(),
          new SyncCallback() {
            @Override public void onResult(SyncResult result) {
              try {
                successful = saveResultInDatabaseFile(result, vault, outputPath);
              } catch (Throwable t) {
                t.printStackTrace(System.err);
              } finally {
                countDownLatch.countDown();
              }
            }
          }, new Executor() {
            @Override public void execute(Runnable runnable) {
              runnable.run();
            }
          });
  
      try {
        countDownLatch.await();
      } catch (InterruptedException e) {
        e.printStackTrace(System.err);
      }
  
      return successful;
    }
docs: Use this method to export Contentful spaces into sqlite3 databases which can be imported later.
  
  @param context     Android (Robolectric?) Context for creating the sqlite database.
  @param spaceClass  Configured {@link Space} containing the name and the id of the space.
  @param accessToken a CDA access token, used for retrieving the resources.
  @return true in case of success. On error, please read System.err output.