0

I am following this Google Developers tutorial and I have written my Android Sender with the Media Chanel to send my songs to chromecast.

The app works well but, when I want to stop the connection,(every time I call teardown() method) my apps logo still appears in my TV background for few minutes before to show the default chromecast "home-screen".

If I "Stop Sending" from Chrome browser tab, the app finish well and the chromecast default wallpapers appears in the TV inmediately. How can i recreated this programaticaly from android ?

Is not the default behavior when you call to...

  Cast.CastApi.stopApplication(mApiClient, mSessionId);

...??

Juanjo
  • 298
  • 1
  • 15
  • Are you using the [CastCompanionLibrary](https://github.com/googlecast/CastCompanionLibrary-android)? If not, you should consider doing so. I believe it handles disconnect in [BastCastManager](https://github.com/googlecast/CastCompanionLibrary-android/blob/master/src/com/google/android/libraries/cast/companionlibrary/cast/BaseCastManager.java) so you can refer to that as a reference, if anything. – Andy Aug 21 '15 at 17:35
  • No, Im not. I'll have a look. Is an easy way to import it with Gradle ? – Juanjo Aug 21 '15 at 18:25
  • You can import the project into Android studio or reference it. The [CastVideos-android sample](https://github.com/googlecast/CastVideos-android/blob/master/build.gradle) would be a good reference, since it goes hand in hand with the CCL. – Andy Aug 21 '15 at 18:31
  • Finally I add CCL as a Module dependency and yes, all this matters seems to be cleaner with this library. – Juanjo Aug 25 '15 at 16:08

0 Answers0