google-nearbyman-in-the-middle

Does ConnectionsClient.sendPayload() encrypt the payload?


If I send data between Android devices using ConnectionsClient.sendPayload(), will the data be encrypted in transit, or can it be intercepted (over wifi or Bluetooth)?


Solution

  • As long as you confirm the token provided in ConnectionLifecycleCallback.onConnectionInitiated() on both devices before calling ConnectionsClient.acceptConnection(), the data is safely encrypted.