hooks/lib/android/manifestWriter.js
function isCategoriesForUniversalLinks(categories) {
  // there can be only 2 categories
  if (categories == null || categories.length != 2) {
    return false;
  }

  var isBrowsable = false;
  var isDefault = false;

  // check intent categories
  categories.forEach(function(category) {
    var categoryName = category['$']['android:name'];
    if (!isBrowsable) {
      isBrowsable = 'android.intent.category.BROWSABLE' === categoryName;
    }

    if (!isDefault) {
      isDefault = 'android.intent.category.DEFAULT' === categoryName;
    }
  });

  return isDefault && isBrowsable;
}
function isCategoriesForUniversalLinks(categories) {
  // there can be only 2 categories
  if (categories == null || categories.length != 2) {
    return false;
  }

  var isBrowsable = false;
  var isDefault = false;

  // check intent categories
  categories.forEach(function(category) {
    var categoryName = category['$']['android:name'];
    if (!isBrowsable) {
      isBrowsable = 'android.intent.category.BROWSABLE' === categoryName;
    }

    if (!isDefault) {
      isDefault = 'android.intent.category.DEFAULT' === categoryName;
    }
  });

  return isDefault && isBrowsable;
}
function isCategoriesForUniversalLinks ( categories ) { // there can be only 2 categories if ( categories == null || categories . length != 2 ) { return false ; } var isBrowsable = false ; var isDefault = false ; // check intent categories categories . forEach ( function ( category ) { var categoryName = category [ '$' ] [ 'android:name' ] ; if ( ! isBrowsable ) { isBrowsable = 'android.intent.category.BROWSABLE' === categoryName ; } if ( ! isDefault ) { isDefault = 'android.intent.category.DEFAULT' === categoryName ; } } ) ; return isDefault && isBrowsable ; }
Check if categories in the intent-filter corresponds to categories for Universal Links.

@param {Array} categories - list of categories in the intent-filter
@return {Boolean} true - if action for Universal Links; otherwise - false
Check if categories in the intent - filter corresponds to categories for Universal Links .