title: Why my MediaRouteButton not available to find any cast devices?
body: <p>following are my codes in main activity</p>
  
  <pre><code>public class MainActivity extends ActionBarActivity{
  private MediaRouteButton mMediaRouteButton;
  private MediaRouteSelector mMediaRouteSelector;
  private MediaRouter mMediaRouter;
  private CastDevice mSelectedDevice;
  private MyMediaRouterCallback mMediaRouterCallback;
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      if(this.checkGooglePlaySevices(this))
          Log.v("cc5zhenhua","googleplayservice okay");
      else
      {
          Log.v("cc5zhenhua","googleplayservice not ok");
          //GooglePlayServicesUtil.getErrorDialog(0, this, 0).show();
      }
      //initialize media cast objects
       mMediaRouter=MediaRouter.getInstance(getApplicationContext());      
       mMediaRouteSelector=new MediaRouteSelector.Builder()
       .addControlCategory(CastMediaControlIntent.CATEGORY_CAST).build();      
       mMediaRouterCallback= new MyMediaRouterCallback();
       mMediaRouter.addCallback(mMediaRouteSelector, mMediaRouterCallback);    
  }
  
  public void onStart() {
      super.onStart();
      mMediaRouter.addCallback(mMediaRouteSelector, mMediaRouterCallback
              );
      MediaRouter.RouteInfo route = mMediaRouter.updateSelectedRoute(mMediaRouteSelector);
      // do something with the route...
  }
  @Override
  protected void onResume()
  {
      super.onResume();
      mMediaRouter.addCallback(mMediaRouteSelector, mMediaRouterCallback);
  }
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      super.onCreateOptionsMenu(menu);
  
      //mMediaRouteButton.setRouteSelector(mMediaRouteSelector);
      return true;
  }
  @Override
  public boolean onPrepareOptionsMenu(Menu menu){
      getMenuInflater().inflate(R.menu.main, menu);
      MenuItem mediaRouteItem = menu.findItem( R.id.action_mediaroute01 );
      MediaRouteActionProvider mediaRouteActionProvider =
              (MediaRouteActionProvider)MenuItemCompat.getActionProvider(
                      mediaRouteItem);
      mediaRouteActionProvider.setRouteSelector(mMediaRouteSelector);
      mMediaRouteButton = (MediaRouteButton) mediaRouteItem.getActionView();
      return true;}
  
   public  boolean checkGooglePlaySevices(final Activity activity) {
          final int googlePlayServicesCheck = GooglePlayServicesUtil.isGooglePlayServicesAvailable(
                  activity);
          switch (googlePlayServicesCheck) {
              case ConnectionResult.SUCCESS:
                  return true;
              default:
                 Log.v("cc5zhenhua","test");          }
          return false;
   }
  private class MyMediaRouterCallback extends MediaRouter.Callback 
  {
    @Override
    public void onRouteSelected(MediaRouter router, RouteInfo info) {
      mSelectedDevice = CastDevice.getFromBundle(info.getExtras());
      String routeId = info.getId();
      Log.v("cc5zhenhua", "MainActivity.onRouteSelected");        
    }
    @Override
    public void onRouteUnselected(MediaRouter router, RouteInfo info) {
      //teardown();
      mSelectedDevice = null;
    }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>There's no build error. However when I run the main activity, the media route button can not be clicked at all. Please advise any where I missed? Thank you!</p>
  
  <p>My chromecast is whitelisted registed with an APPID before the new SDK published.
  I can't use that appID for the control category either, it throws not valida appID exception.</p>
  
  <p>My cast device is also available for chromecast extension in my computer.</p>