googlecast / CastVideos-android

Reference Android Sender w/ Framework API: CastVideos-android application shows how to cast videos from an Android device that is fully compliant with the Cast Design Checklist.
Apache License 2.0
345 stars 182 forks source link

I cannot disconnect Chromecast #94

Closed markshim1 closed 2 years ago

markshim1 commented 4 years ago

I ran the sample app and played contents through cast device. And I tried to disconnect cast, however cast device(TV) is not disconnected and kept playing contents. In App, cast button looks not connected. So I quit the app and open it again and cast button shows it's connected. I tried several times to disconnect, but I wasn't able to. Only way I could was that I disconnect cast through notification bar. Do know why? Thanks

c0d3base commented 3 years ago

Have a couple of questions regarding this:

  1. How are you trying to disconnect it?
  2. If you're trying to disconnect using the 'Stop Casting' button, then you need to change this [flag](https://developers.google.com/android/reference/com/google/android/gms/cast/framework/CastOptions#getStopReceiverApplicationWhenEndingSession()) to true. This would force the receiver app to disconnect.