Code example for MediaRouter

Methods: removeCallback

0
    } 
 
    @Override 
    public void onDetachedFromWindow() { 
        mAttachedToWindow = false;
        mRouter.removeCallback(mCallback);
 
        super.onDetachedFromWindow(); 
    } 
 
    /** 
     * Refreshes the list of routes that are shown in the chooser dialog. 
     */ 
    public void refreshRoutes() { 
        if (mAttachedToWindow) {
            mAdapter.update();
        } 
    } 
 
    private final class RouteAdapter extends ArrayAdapter<MediaRouter.RouteInfo>
            implements ListView.OnItemClickListener {