hooks/lib/android/manifestWriter.js
function injectPathComponentIntoIntentFilter(intentFilter, pathName) {
  if (pathName == null || pathName === '*') {
    return;
  }

  var attrKey = 'android:path';
  if (pathName.indexOf('*') >= 0) {
    attrKey = 'android:pathPattern';
    pathName = pathName.replace(/\*/g, '.*');
  }

  if (pathName.indexOf('/') != 0) {
    pathName = '/' + pathName;
  }

  intentFilter['data'][0]['$'][attrKey] = pathName;
}
function injectPathComponentIntoIntentFilter(intentFilter, pathName) {
  if (pathName == null || pathName === '*') {
    return;
  }

  var attrKey = 'android:path';
  if (pathName.indexOf('*') >= 0) {
    attrKey = 'android:pathPattern';
    pathName = pathName.replace(/\*/g, '.*');
  }

  if (pathName.indexOf('/') != 0) {
    pathName = '/' + pathName;
  }

  intentFilter['data'][0]['$'][attrKey] = pathName;
}
function injectPathComponentIntoIntentFilter ( intentFilter , pathName ) { if ( pathName == null || pathName === '*' ) { return ; } var attrKey = 'android:path' ; if ( pathName . indexOf ( '*' ) >= 0 ) { attrKey = 'android:pathPattern' ; pathName = pathName . replace ( / \* / g , '.*' ) ; } if ( pathName . indexOf ( '/' ) != 0 ) { pathName = '/' + pathName ; } intentFilter [ 'data' ] [ 0 ] [ '$' ] [ attrKey ] = pathName ; }
Inject host path into provided intent-filter.

@param {Object} intentFilter - intent-filter object where path component should be injected
@param {String} pathName - host path to inject
Inject host path into provided intent - filter .