Android – cast device discovery is not applicable to default_ MEDIA_ RECEIVER_ APPLICATION_ ID

Tried the casthellotext Android master example in the Google cast SDK

If I change mediarouteselector to find castmediacontrolintent.default_ MEDIA_ RECEIVER_ APPLICATION_ ID, I can't seem to make device discovery work. The cast button doesn't appear. But if I change it to castmediacontrolintent.category_ Cast, I can make the button display

The reason I do this is that I intend to use the default media receiver instead of deploying my own receiver

I want to know if there are any errors here. Or I should insist on using category_ If you have a way to make it work, please tell me the way, thank you

resolvent:

These two static variables have different purposes. According to the document http://developer.android.com/reference/com/google/android/gms/cast/CastMediaControlIntent.html : CATEGORY_ Cast – control category used to discover cast devices. Default_ MEDIA_ RECEIVER_ APPLICATION_ ID – application ID of cast default media receiver

Therefore, use category_ Cast performs discovery and uses default in the launchapplication call_ MEDIA_ RECEIVER_ APPLICATION_ ID.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>