examples/cordova1/plugins/branch-cordova-sdk/src/scripts/android/updateAndroidManifest.js
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);
  }
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);
  }
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 ) ; }
injects config.xml preferences into AndroidManifest.xml file.
injects config . xml preferences into AndroidManifest . xml file .