public boolean launchAppOnNodes(@Nullable final String activityName,@Nullable Bundle bundle,boolean relaunchIfRunning,final String capability,@Nullable NodeSelectionFilter filter){
  Set<Node> nodes=getNodesForCapability(capability);
  if (nodes != null && !nodes.isEmpty()) {
    if (filter == null) {
      filter=new NearbyFilter();
    }
    Set<Node> filteredNodes=filter.filterNodes(nodes);
    if (filteredNodes == null) {
      Log.w(TAG,"No node was found to match the filter " + filter.describe());
      return false;
    }
    for (    Node targetNode : filteredNodes) {
      launchAppOnNode(activityName,bundle,relaunchIfRunning,targetNode);
    }
    return true;
  }
  return false;
}

public boolean launchAppOnNodes ( @ Nullable final String activityName , @ Nullable Bundle bundle , boolean relaunchIfRunning , final String capability , @ Nullable NodeSelectionFilter filter ) { Set < Node > nodes = getNodesForCapability ( capability ) ; if ( nodes != null && ! nodes . isEmpty ( ) ) { if ( filter == null ) { filter = new NearbyFilter ( ) ; } Set < Node > filteredNodes = filter . filterNodes ( nodes ) ; if ( filteredNodes == null ) { Log . w ( TAG , "No node was found to match the filter " + filter . describe ( ) ) ; return false ; } for ( Node targetNode : filteredNodes ) { launchAppOnNode ( activityName , bundle , relaunchIfRunning , targetNode ) ; } return true ; } return false ; }
launches an activity on the nodes identified by the given capability and filter .
