Different Tokens for Each Session?

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!
Answered by Frameworks Engineer in 659584022
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:
  1. First, create an NISession and send the session's unique discoveryToken to the session's designated peer.

  2. Second, receive the peer session's Discovery Token in return.

  3. Finally, create a session configuration using the received Discovery Token, and run the session with it.

Accepted Answer
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:
  1. First, create an NISession and send the session's unique discoveryToken to the session's designated peer.

  2. Second, receive the peer session's Discovery Token in return.

  3. Finally, create a session configuration using the received Discovery Token, and run the session with it.

Different Tokens for Each Session?
 
 
Q