Tabnine Logo
MediaRouter$RouteInfo.matchesSelector
Code IndexAdd Tabnine to your IDE (free)

How to use
matchesSelector
method
in
android.support.v7.media.MediaRouter$RouteInfo

Best Java code snippets using android.support.v7.media.MediaRouter$RouteInfo.matchesSelector (Showing top 3 results out of 315)

origin: derry/delion

@Override
public void onRouteAdded(MediaRouter router, MediaRouter.RouteInfo route) {
  if (route == null || !route.matchesSelector(mRouteSelector)) return;
  MediaSink sink = MediaSink.fromRoute(route);
  if (mSinks.contains(sink)) return;
  mSinks.add(sink);
  updateChromeMediaRouter();
}
origin: derry/delion

@Override
public void startObservingMediaSinks(String sourceId) {
  if (mAndroidMediaRouter == null) return;
  MediaSource source = MediaSource.from(sourceId);
  if (source == null) return;
  MediaRouteSelector routeSelector = source.buildRouteSelector();
  if (routeSelector == null) {
    // If the application invalid, report no devices available.
    onSinksReceived(sourceId, new ArrayList<MediaSink>());
    return;
  }
  String applicationId = source.getApplicationId();
  DiscoveryCallback callback = mDiscoveryCallbacks.get(applicationId);
  if (callback != null) {
    callback.addSourceUrn(sourceId);
    return;
  }
  List<MediaSink> knownSinks = new ArrayList<MediaSink>();
  for (RouteInfo route : mAndroidMediaRouter.getRoutes()) {
    if (route.matchesSelector(routeSelector)) {
      knownSinks.add(MediaSink.fromRoute(route));
    }
  }
  callback = new DiscoveryCallback(sourceId, knownSinks, this, routeSelector);
  mAndroidMediaRouter.addCallback(
      routeSelector,
      callback,
      MediaRouter.CALLBACK_FLAG_REQUEST_DISCOVERY);
  mDiscoveryCallbacks.put(applicationId, callback);
}
origin: derry/delion

@Override
public void onRouteChanged(MediaRouter router, MediaRouter.RouteInfo route) {
  // Sometimes onRouteAdded is not called for the route as it doesn't yet match the selector.
  // onRouteChanged() will be called later when the matching category is added.
  if (route == null) return;
  if (route.matchesSelector(mRouteSelector)) {
    onRouteAdded(router, route);
  } else {
    onRouteRemoved(router, route);
  }
}
android.support.v7.mediaMediaRouter$RouteInfomatchesSelector

Popular methods of MediaRouter$RouteInfo

  • getName
  • getDescription
  • getId
  • getPlaybackType
  • getVolumeHandling
  • isConnecting
  • isSelected
  • select
  • sendControlRequest
  • supportsControlCategory
  • supportsControlRequest
  • getExtras
  • supportsControlRequest,
  • getExtras,
  • getPlaybackStream,
  • getPresentationDisplay,
  • getProvider,
  • getVolume,
  • getVolumeMax,
  • isDefault,
  • isEnabled

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (ScheduledExecutorService)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now