In order to develop for the platform, you need to register your application[0], and your device[1]. Also you cannot even run your own application without getting google's approval[2], which costs $5..
Then, at runtime, the device will first validate that the app you are trying to run was validated, sending the `AppID` to google.
0: https://developers.google.com/cast/docs/registration#Registe...
1: https://developers.google.com/cast/docs/registration#Registe...