Search code examples
google-cast

How to get the device name inside the receiver app?


I'd like to discover the Chromecast device name to be able to generate some unique id. Alternatively is there other unique id I could use?


Solution

  • I imagine by "name" you mean the name that you assign to your device, correct? If so, you cannot get that on the receiver side. The only way to get that which comes to my mind is to have a "sender" app sends that to the receiver. I am not sure how you are using it but names are not required to be unique, so keep that in mind; and they can be changed by a user.

    There is no unique id that is exposed, as far as I know. Can you tell us what you'd like to do so we may be able to offer an alternate route?