Hello,
I just wanted to confirm.. If I were to start 2 simultaneous NearbyInteraction sessions with 2 peers, it would generate a unique token for me to send to a peer for each session, correct?
Thanks!
I just wanted to confirm.. If I were to start 2 simultaneous NearbyInteraction sessions with 2 peers, it would generate a unique token for me to send to a peer for each session, correct?
Thanks!
Correct. Each NISession you create has its own unique Discovery Token, which is provided through the session's discoveryToken property. The process is the same whether you intend to run one NISession or several:
First, create an NISession and send the session's unique discoveryToken to the session's designated peer.
Second, receive the peer session's Discovery Token in return.
Finally, create a session configuration using the received Discovery Token, and run the session with it.