Domanda

When casting a tab from chrome, the receiver registers a new sender with an id like this:

18:client-69832

However, when the chrome tab is reloaded, a call to castReceiverManager.getSenders() now contains two entries and continues to increase every time the page is reloaded

castReceiverManager.getSenders() -> 18:client-69832
RELOAD
castReceiverManager.getSenders() -> 18:client-69832, 18:client-78542
RELOAD
castReceiverManager.getSenders() -> 18:client-69832, 18:client-78542, 18:client-84557
etc...

The first part 18:client seems to remain consistent across reloads. Can we rely on this to uniquely identify the device? If not, how can we uniquely identify the device?

È stato utile?

Soluzione

When you say unique, what is the scope that you have in mind If you are looking for something that persists between sessions, then that number s not unique. If you want something unique across sessions, one approach is to have each sender create such uid and communicate that to the receiver (if receiver needs to know).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top