Search code examples
google-chrome-extensionchromecastgoogle-cast

Can I use UDN as a unique id for chromecast


I noticed that as part of the device discovery exchange, device-desc.xml file contains a UDN value. Can I use this as a unique id for that chromecast device?


Solution

  • You should be able to use the UDN as a unique identifier for a particular Chromecast.

    UDN typically means "unique device name" and the format looks like a UUID which was made so that you can uniquely identify things.

    As for your other question about how to collect metrics, it depends on what you want to collect and why.

    If, for example, you wanted to figure out what the social usage of your app was (assuming that you had some multi-participant logic) you could track usage by device and see if certain devices are hubs of social activity and see usage patterns. This might help you figure out what sorts of features you need and help you determine if you have repeat users or if you have repeat locations meaning that you may want to persist state in different places.

    However, I would suppose that the most value can be gained by attaching behaviors to users. It may be better to track application sessions and attach data to a session which would indicate how users interacted with your app and with each other. You can define a "session" in multiple ways. It could be the duration of a user's "joining" of a receiver app or the life of the receiver app itself. Probably a bit of both would be best.