Reputation: 41
was trying out the CastHelloText-android-master sample in the Google cast sdk.
it seems that I can't get device discovery to work if I change the MediaRouteSelector to look for CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID. The Cast button didn't appear. but if I change it to CastMediaControlIntent.CATEGORY_CAST, I'm able to get the button to show up.
The reason why I doing this is that I intend to use the default media receiver instead of deploying my own receiver.
I was wondering if there's a bug here. or I should just stick to CATEGORY_CAST for discovery. If you have a way to make it work, pls show me the way, Thanks.
Upvotes: 4
Views: 1442
Reputation: 475
Those two static variables have different purposes. According to the doc http://developer.android.com/reference/com/google/android/gms/cast/CastMediaControlIntent.html:
CATEGORY_CAST
- A control category for discovering Cast devices.
DEFAULT_MEDIA_RECEIVER_APPLICATION_ID
- The application id for the Cast Default Media Receiver.
So, use CATEGORY_CAST
for discovery and use the DEFAULT_MEDIA_RECEIVER_APPLICATION_ID
in your launchApplication
call.
Upvotes: 3