Code example for MediaRouter

Methods: removeCallback

0
  @Override 
  protected void onPause() { 
    clearPreso(false); 
 
    if (router != null) {
      router.removeCallback(cb);
    } 
 
    super.onPause(); 
  } 
 
  private void handleRoute(RouteInfo route) {
    if (route == null) {
      clearPreso(true); 
    } 
    else { 
      Display display=route.getPresentationDisplay();
 
      if (route.isEnabled() && display != null) {
        if (preso == null) {
          showPreso(route);