Journal for Developers

Changes in Android Nearby.Connections API

0 45

API Changes in version 11.0.55

In GmsCore version 11.0.55, the Nearby Connections API was updated with a number of significant changes, including the following new features:

  • Offline support. Nearby Connections now works fully offline, no network connectivity required. Devices no longer need to be connected to the same multicast-enabled wifi network to discover or connect to each other.
  • Encrypted connections. Connections established between devices are now fully encrypted, ensuring that only the intended partipicants can read exchanged data.
  • Large payload support. Nearby Connections now supports large Payload objects, which may be messages (up to 32kb), files, and even streaming data. The API also provides realtime progress updates about in-flight payloads.
  • Simplified, symmetric API. The API has been simplified to be easy to use and more symmetric between advertiser and discoverer devices.

Learn more about the new functionality in the updated documentation.

Key differences

This section highlights some key differences between version 11.0.55 and previous versions of Nearby Connections.

  1. It is now possible to advertise and discover at the same time.
  2. You no longer need to check network connectivity or prompt users to connect to a multicast-enabled wifi network.
  3. It is no longer required to declare your SERVICE_ID in AndroidManifest.xml. Instead, pass it as a parameter to both startAdvertising() and startDiscovery().
  4. There is now no distinction between “reliable” and “unreliable” send methods, as sendReliableMessage() and sendUnreliableMessage() are now deprecated. All payloads are sent via sendPayload() and are guaranteed to be delivered in order.
  5. The device ID of discovered endpoints is no longer exposed.

Source viva: https://developers.google.com/nearby/connections/v11-update

Subscribe to our Journal

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!