ios-nearby icon indicating copy to clipboard operation
ios-nearby copied to clipboard

Transfer data

Open Venko132 opened this issue 9 years ago • 1 comments

Hello, I have got few questions in using of nearby-api. From documentation: "The server facilitates message exchange between two devices when both are associated with a common token"

  1. Will two ios devices use to transfer data peer-to-peer(or other local) connection? Or they will use Google Cloud server?

  2. When communicate ios and android devices, will they use to transfer data Google Cloud server, or they transfer it in local network?

  3. Can I communicate with special one (not with all devices) - send data only for him? And vice versa - only receive data from it. If yes, can you give example?

Venko132 avatar Aug 18 '16 16:08 Venko132

Hello,

Happy to answer your questions! 1&2) Two iOS/Android devices will use BLE (Bluetooth Low Energy) and/or high frequency audio to exchange a token, which is pure peer-to-peer. The receipt of a token by either device establishes the connection. The token is then sent to the Google Nearby server, at which point data can be exchanged between the two devices via the cloud. 3) Nearby Messages is not connection-based; it uses a broadcast model, so all devices that are within proximity of the publishing device will be able to receive the published data. You can build a connection-based protocol on top of it by performing a security handshake between two of them, but it would suffer from very high latency, due to the way Nearby Messages are exchanged.

dan-webb avatar Aug 22 '16 19:08 dan-webb