code: function getMainLaunchActivityIndex(activities) {
      let launchActivityIndex = -1;
  
      for (let i = 0; i < activities.length; i++) {
        const activity = activities[i];
        if (isLaunchActivity(activity)) {
          launchActivityIndex = i;
          break;
        }
      }
  
      return launchActivityIndex;
    }
docs: get the main <activity> because Branch Intent Filters must be in the main Launch Activity