samples/cordova/video_chat/plugins/cordova-custom-config/hooks/applyCustomConfig.js
function parseAndroidPreferences(preferences, configData){
        var type = 'preference';

        _.each(preferences, function (preference) {
            // Extract pre-defined preferences (deprecated)
            var target,
                prefData;

            if(preference.attrib.name.match(/^android-manifest\//)){
                // Extract manifest Xpath preferences
                var parts = preference.attrib.name.split("/"),
                    destination = parts.pop();
                parts.shift();

                prefData = {
                    parent: parts.join("/") || "./",
                    type: type,
                    destination: destination,
                    data: preference
                };
                target = "AndroidManifest.xml";
            }

            if(prefData){
                if(!configData[target]) {
                    configData[target] = [];
                }
                configData[target].push(prefData);
            }
        });
    }
function parseAndroidPreferences(preferences, configData){
        var type = 'preference';

        _.each(preferences, function (preference) {
            // Extract pre-defined preferences (deprecated)
            var target,
                prefData;

            if(preference.attrib.name.match(/^android-manifest\//)){
                // Extract manifest Xpath preferences
                var parts = preference.attrib.name.split("/"),
                    destination = parts.pop();
                parts.shift();

                prefData = {
                    parent: parts.join("/") || "./",
                    type: type,
                    destination: destination,
                    data: preference
                };
                target = "AndroidManifest.xml";
            }

            if(prefData){
                if(!configData[target]) {
                    configData[target] = [];
                }
                configData[target].push(prefData);
            }
        });
    }
function parseAndroidPreferences ( preferences , configData ) { var type = 'preference' ; _ . each ( preferences , function ( preference ) { // Extract pre-defined preferences (deprecated) var target , prefData ; if ( preference . attrib . name . match ( / ^android-manifest\/ / ) ) { // Extract manifest Xpath preferences var parts = preference . attrib . name . split ( "/" ) , destination = parts . pop ( ) ; parts . shift ( ) ; prefData = { parent : parts . join ( "/" ) || "./" , type : type , destination : destination , data : preference } ; target = "AndroidManifest.xml" ; } if ( prefData ) { if ( ! configData [ target ] ) { configData [ target ] = [ ] ; } configData [ target ] . push ( prefData ) ; } } ) ; }
Parses supported Android preferences using the preference mapping into the appropriate XML elements in AndroidManifest.xml
Parses supported Android preferences using the preference mapping into the appropriate XML elements in AndroidManifest . xml