Search code examples
chromecastgoogle-cast

How to implement same custom receiver app for different sender apps having different graphics and media assets?


I want to use same chromecast custom receiver app hosted on my server but I want it to load different assets (logo, splash screen, watermark etc) for each specific app. Is there a way that the sender app will include GET data mentioning the app name so that receiver can include assets specific to that app? And how the receiver will receive the assets and include those before the app starts? I went through the Google cast docs but I am not able to figure out proper solution.


Solution

  • When your receiver app is launching, there are no parameters available for you to pass any extra information to the launch process; an app-id is mapped to a fixed URL (defined in your dev console). You can definitely change the rest later on; for example, your app can launch and while the splash screen is being shown, you can communicate with your app and pass some info so it can load certain CSS but all of these is after the Cast SDK is loaded on the receiver side, a connection is established and all that.