Android Cast v3: cannot find any device

I am trying to integrate android cast v3 in my application and cannot make it work.

I did exactly what is written in this google document: https://developers.google.com/cast/docs/android_sender_integrate (up to the heading: "Configure device discovery")

And the dialog that opened when I click on MediaRouteButton cannot find any device until the success of the youtube application detects my Android device.

what did I miss?

// the code of the CastOptionsProvider: class CastOptionsProvider implements OptionsProvider { @Override public CastOptions getCastOptions(Context appContext) { return new CastOptions.Builder().setReceiverApplicationId( CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID).build(); } @Override public List<SessionProvider> getAdditionalSessionProviders(Context context) { return null; } } // the code in the custom view: mMediaRouteButton = (MediaRouteButton)findViewById(R.id.media_route_button); CastButtonFactory.setUpMediaRouteButton(getContext(), mMediaRouteButton); mCastContext = CastContext.getSharedInstance(getContext()); 

and in the manifest (inside the application tag):

 <meta-data android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME" android:value="com.bla-company-bla.core.cast.CastOptionsProvider"/> 
+8
android chromecast google-cast
source share

No one has answered this question yet.

See related questions:

3606
Close / hide Android soft keyboard
3295
Why is the Android emulator so slow? How can we speed up Android emulator development?
3288
Correct use cases for Android UserManager.isUserAGoat ()?
2609
Is there a unique identifier for an Android device?
2510
How to keep Android activity state by saving instance state?
2097
Is there a way to run Python on Android?
1858
"Debug certificate expired" error in Android Eclipse plugins
1844
What is "Context" on Android?
1116
Installing Android SDK does not find JDK
one
How to add custom SessionProvider with Google Cast SDK 3

All Articles