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)
I think you need to register your application on the dashboard here.
After registration, you would be given a APPLICATION ID for your application, which you can then use for development.
Excerpt from the documentation :
Before you can develop and test apps on your own Google Cast device, you need to acquire an app ID for your API calls and register your Google Cast device (such as a Chromecast) as a development device. For details, read the Registration guide.
来源:https://stackoverflow.com/questions/26454203/where-can-i-find-application-id