During testing of Google Nearby Connections 2.0 using the sample walkie-talkie program in automatic mode, sometimes the device will ask for Bluetooth pairing pin number. I have seen two scenarios:
Only one device has a pop-up dialog asking for pin. Enter any data or dismiss the dialog will cause the connection to fail
Both devices have pop-up dialogs. One to ask for setting up pin and other ask to enter the pin. After pin has been entered, the connection was a success.
Senario 1 happens more often.
How can I avoid this problem? I can not find any information on the Nearby Connections 2.0 SDK documentation.
I am also seeing this error in my own app, which uses Google Nearby Connections 2.0. The "walkie-talkie" sample program uses the P2P "star" strategy, whereas my app uses the P2P "cluster" strategy. Therefore, we can see that the problem occurs in both cases. I would like to know:
(1) What causes this error?
(2) What (if anything) can the app receiving the error do to remedy it?
(3) If something needs to be done to the physical devices in this situation, what would be a reasonable message to tell the user?
I have found very little good technical documentation about error conditions in Nearby Connections 2.0, and would very much like to see some. Therefore, even if nobody is able to answer this specific question directly, I will consider awarding the bounty to the best answer that provides other technical information about Nearby Connections errors.