title: Chromecast button not visible in android
body: <p>I am following the <a href="https://codelabs.developers.google.com/codelabs/cast-videos-android/#4" rel="nofollow noreferrer">code lab tutorial</a>.</p>
  
  <p>My Gradle file looks like this </p>
  
  <pre><code>dependencies {
  compile 'com.android.support:appcompat-v7:25.0.0'
  compile 'com.android.support:mediarouter-v7:25.0.0'}
  </code></pre>
  
  <p>This is my CastOptionsProvider class</p>
  
  <pre><code>public class CastOptionsProvider implements OptionsProvider {
  @Override
  public CastOptions getCastOptions(Context context) {
      return new CastOptions.Builder()
              .setReceiverApplicationId(context.getString(R.string.chromecast_app_id))
              .build();
  }
  
  @Override
  public List&lt;SessionProvider&gt; getAdditionalSessionProviders(Context context) {
      return null;
  }}
  </code></pre>
  
  <p>This is the menu xml file</p>
  
  <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"&gt;
  
  &lt;item
      android:id="@+id/media_route_menu_item"
      android:title="@string/media_route_menu_title"
      app:actionProviderClass="android.support.v7.app.MediaRouteActionProvider"
      app:showAsAction="always" /&gt;&lt;/menu&gt;
  </code></pre>
  
  <p>And this is my OnCreateOptionsMenu method in MainActivity</p>
  
  <pre><code>@Override
  public boolean onCreateOptionsMenu(Menu menu) {
      super.onCreateOptionsMenu(menu);
      getMenuInflater().inflate(R.menu.navigation_drawer, menu);
      mediaRouteMenuItem = CastButtonFactory.setUpMediaRouteButton(getApplicationContext(), menu, R.id.media_route_menu_item);
      return true;
  }
  </code></pre>
  
  <p>And this in the manifest file </p>
  
  <pre><code>&lt;meta-data
          android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME"
          android:value="com.mypackage.CastOptionsProvider" /&gt;
  </code></pre>
  
  <p>I have followed the codelab tutorial to its exact form, copy and pasted everything while changing those variable which needs to be changed.
  My application and the chromecast device are connected to the same network. The Chromecast button appears in the Youtube app but not on my app. What am I missing ?
  Thanks</p>