code: function writePreferences(context, preferences) {
      // read manifest
      const manifest = getManifest(context);
  
      // update manifest
      manifest.file = updateBranchMetaData(manifest.file, preferences);
      manifest.file = updateBranchReferrerTracking(manifest.file);
      manifest.file = updateLaunchOptionToSingleTask(
        manifest.file,
        manifest.mainActivityIndex
      );
      manifest.file = updateBranchURIScheme(
        manifest.file,
        manifest.mainActivityIndex,
        preferences
      );
      manifest.file = updateBranchAppLinks(
        manifest.file,
        manifest.mainActivityIndex,
        preferences,
        manifest.targetSdk
      );
  
      // save manifest
      xmlHelper.writeJsonAsXml(manifest.path, manifest.file);
    }
docs: injects config.xml preferences into AndroidManifest.xml file.