Closed TheDreamsWind closed 2 years ago
Hello,
Thanks for reaching out. This aspect of Nearby is indeed confusing at first, and it's important for our customers to understand it. Let me try to explain.
There are two distinct phases of operation: (1) device discovery, and (2) message delivery (from publisher to subscriber).
Examples: a. A mobile game that uses Nearby to allow players to start games with each other. This is a scenario where both phones must broadcast and scan simultaneously in order to discover each other. b. A set-top box and a mobile phone that connects to it (e.g., to cast video to it). The set-top box can advertise, and the mobile device can scan.
I hope this helps. Please let me know if you have more questions.
Thank you for clarification, but i have additional question now. Is it right, that device discovery state is a global state for publishing and subscribing? If so, should i set up only one strategy for both actions?
There is no global state. Device discovery is the union of all active publications and subscriptions created from the same message manager. If you want to prevent discovery from "leaking" between pubs/subs, you should be able to accomplish this by creating them from different message managers. Let me know if you try this and have problems getting it working as expected.
Hello, Nearby Team and thank you for this outstanding technology.
I have a question about it and hope you can help me. I am a bit confused about ability to configure disocvery mode for subscription and publishing: as i understand, when i try to subscribe, i should only be able to listen, so Is there any sense to configure discovery mode to
kGNSDiscoveryModeBroadcast
only or tokGNSDiscoveryModeDefault
at least? Or should i always set it tokGNSDiscoveryModeScan
for Nearby to work properly (and vice versa for publishing)?Thank you in advance.