Nearby Connections API and Nearby Share discovers same device more than once

492 Views Asked by At

There is a problem I've noticed with the Nearby Connections API, sometimes the same devices gets discovered two or more times. They have the same name but different endpointId. If we try to initiate connection with the first discovered device it never succeeds, connection is established only when selecting the device which was discovered last. I've spotted the same problem with the Nearby Share functionality. Is there any solution to this problem, like could we make the advertising device not change it's endpointId?

enter image description here

1

There are 1 best solutions below

0
On

This should be fixed next week.

We made a change to rotate the EndpointID if the device stopped / restarted advertising. The goal was to better protect privacy, but it had the side affect of showing multiple targets until the first one times out. In the change that's now rolling out, restarting a high power advertisement within 30sec will reuse the same ID.

You can test the change out today by joining the Play Services beta.