I'm learning cast api for android and I'm stuck at this part:
mMediaRouteSelector = new MediaRouteSelector.Builder()
.addControlCategory(CastMediaControlIntent.categoryForCast("YOUR_APPLICATION_ID"))
.build();
Where can I find this APPLICATION_ID
and what is it?
Unfortunately, when doing Google Cast Android Sender Application tutorial, you should do multiple steps not described well on site to develop Chromecast applications:
- You must sign up (yes, pay 5$) for Google Cast SDK
- After this process, I suggest you to add your device serial number in Google Cast SDK Developer Console since it's 15 minute long process. More details about this process you can find on Google Cast Registration page
- While waiting for device registration, add your application on Google Cast SDK Developer Console by clicking on Add new Application. Choose Styled Media Receiver in next step, and you can put anything in Application Name
- By saving application, you'll get
YOUR_APPLICATION_ID
- After 15 minutes (or when adding device is ready), don't forget to do step 6. and 7. from Google Cast Registration page
- In the Chromecast setup app, select your Chromecast and check the box, Send this Chromecast's serial number when checking for updates.
- Restart your Cast device: disconnect the power or USB cable from the device, then reconnect it (or you can simply click reboot on Chromecast setup app)