SePröbläm
SePröbläm

Reputation: 5739

GPGS Nearby connection: Is it valid to advertise and discover at the same time?

Using nearby connections of Google Play Game Services, is it valid to advertise and discover nearby connections at the same time?

The docs state:

Note: An advertising (host) device can only accept or reject requests. It cannot send them.

That makes sense if the device is only advertising. But does this also mean an advertising device can't discover?

The reason why we'd like to do both, advertise and discover at the same time, is to keep the user interface simple. If it's valid, every instance of the app would simply list every other instance connected to the network. The first user who clicks on an advertised nearby connection would automatically be the client, while the advertising device would automatically be the host. From a users perspective, this would be way simpler than forcing the users to decide if they want to be the host or the client. The question is: Can it be done?

Upvotes: 2

Views: 416

Answers (1)

SePröbläm
SePröbläm

Reputation: 5739

Just for the records, simultaneous advertising and discovery is supported since version 11.0 of Google Play services. Details can be found here:

https://developers.google.com/android/guides/releases#june_2017_-_version_110

Upvotes: 2

Related Questions