Questions tagged [google-nearby]

Covers both Nearby APIs from Google. Messages is a publish-subscribe API for co-present iOS and Android devices to discover and communicate with each other, as well as beacons. Connections is a low-latency networking API for Android, powering use-cases such as: local multiplayer, collaborative whiteboards, and multi-screen gaming.

Nearby is divided into three parts:

  1. Nearby Messages is a cross-platform publish-subscribe API for exchanging <100KB messages between co-present devices that may or may not be on the same network. Nearby Messages is also used to detect beacons and retrieve messages associated with them via the Google Proximity API

  2. Nearby Connections is a low-latency, socket-like API for sending of bi-directional data between Android devices. Under the hood, the API uses a combination of Bluetooth, BLE, and Wifi hotspots, leveraging the strengths of each while circumventing their respective weaknesses.

  3. Nearby Notifications is for contextual device, app, and website discovery.

For more info developers.google.com/nearby

Nearby Messages

The Nearby Messages API is a publish-subscribe API that lets you pass small binary payloads between internet-connected Android and iOS devices. The devices don't have to be on the same network, but they do have to be connected to the Internet.

Nearby uses a combination of Bluetooth, Bluetooth Low Energy, Wi-Fi and an ultrasonic modem to communicate a unique-in-time pairing code between devices. The server facilitates message exchange between devices that detect the same pairing code.

Examples: Pocket Casts share podcast subscriptions, Trello share board

Nearby Connections

The Nearby Connections API enables your app to easily discover other devices on a local network, connect, and exchange messages in real-time. You can use the Nearby Connections API to give your apps the following capabilities:

  • Collaborative whiteboard: Jot ideas down with nearby participants on a shared virtual whiteboard.
  • Local multiplayer gaming: Set up a multiplayer game and invite other users on the local network to join it. Your app can also allow a player to start an in-game mission when enough nearby participants join.
  • Multi-screen gaming: Use a phone or tablet as a game controller to play games displayed on a nearby large-screen Android device, such as Android TV. Your app can also enable players to see a customized game screen on their personal devices while all nearby participants see a shared common view on a large-screen Android device.

Example: Beach Buggy Racing phone as controller

Nearby Notifications

Nearby Notifications enables you to advertise HTTPS URLs, trigger app intents, and trigger app installs using beacons.

419 questions
4
votes
1 answer

How can I receive pending messages using google nearby API?

I would like to be able to send a message from one user to another using google nearby API. However, according to their guidelines having the device in a subscribe/publish state uses 2.5-3.5 times more battery than usual. Therefore they recommend…
TomTaila
  • 1,694
  • 1
  • 20
  • 33
3
votes
1 answer

Nearby Connections max connected devices - clarification

I was searching what is the max number of connected devices and I came across a post that roughly states: When using P2P_STAR, the max number of devices is 10 as this topoly uses Wi-Fi hotspots. That is, if you don't have a router. This makes me ask…
3
votes
1 answer

Google nearby message cant use between Android and IOS

I used google nearby message for my app. Previously, my app was able to exchange data between Android and IOS. But lately I cannot exchange data between Android and IOS. I can not find any documentation about this. Can someone explain it to me?
khtntt
  • 33
  • 4
3
votes
0 answers

Nearby Connections 2.0: simultaneous connection requests fail on both devices

I am working on a P2P chat application where I connect with devices and save their info in local Room database. Every time the app is launched, I start advertising and discovering (at the same time) in order to see other nearby devices but also be…
3
votes
3 answers

Using Google API Key with restriction in Android

While creating Google Maps API key there are four restrictions we can apply:- IP addresses (web servers, cron jobs, etc.). HTTP Referer (Javascript) Andoid (For SDK) ios (For SDK) Now everything works fine if we use the keys to their respective…
3
votes
1 answer

Nearby Connection : Discovery issues on Android 10

For one of my project I work with Nearby Connection API with P2P_STAR strategy and I experience issue on discovery with Android 10. I have tested with Huawei devices that resulted in no connection at all with host and on a freshly updated Xiaomi MI…
hbollon
  • 51
  • 1
  • 5
3
votes
0 answers

Nearby API Package for React Native

I was searching for the Nearby API package. I found 2 packages but both the packages are deprecated. Can someone please help me if they are aware of any package that is available in react native for Nearby API? I have tried below package but they…
3
votes
0 answers

Nearby connection Api When sending the file payloads it is very slow in the receiver side based on devices

If a connection strategy is P2P_CLUSTER, it's able to connect and send a payload to multiple devices, but it is very slow in receiving the payload from the sender. In Samsung s9, Samsung note9 and Lenovo PB2-670M devices it is very slow. In LG g6,…
3
votes
0 answers

How to connect 3+ devices using Google-Nearby Connection APIs

I am building an app that should connect at least 4 devices using nearby connection api. I am able to connect them intermittently, other wise only two devices are getting connected. I am using P2P-CLUSTER Topology and sending data as file payloads…
Laura
  • 73
  • 1
  • 6
3
votes
2 answers

Nearby Connections and foreground/background services

This is more of a general question, but to what extent can we use the Nearby Connections API in services? I noticed that discovery and pairing is still working while the app is out of focus, so is it possible to extract the whole connections client…
3
votes
0 answers

Google NearBy API usage and pricing

I am implementing Google's NearBy Messages API for a proximity based feature on my iOS app. I am trying to find out quota limit that I may need. This is the information provided on the developer console: Queries per day 8,640,000 Queries per 100…
Dave
  • 4,038
  • 9
  • 45
  • 57
3
votes
1 answer

Be able to send Messages/Bytes Simultaneous to multiple devices using Nearby Connections

To try out the nearbyAPI, I decided to build an app that would allow a teacher to track attendance of student in a class. Similar to what Caren Chang is doing. I have gone through the google sample codes on rockpaperscissors and walkietalkie But…
Job M
  • 3,331
  • 2
  • 19
  • 26
3
votes
1 answer

Google Nearby Connections 2.0 capabilities

I am evaluating Google Nearby connections2.0 more specifically evaluating the synergy effect of it. For this I am evaluating it against Wifi, Bluetooth and BLE in totally offline scenario, without any router. Scenario One device is advertising, all…
Abubakar
  • 1,022
  • 10
  • 20
3
votes
0 answers

Google Nearby Connections - no data transfer with Wifi

I have the following setup: a Motorola G4 and a G5, one as advertiser, the other one in discovery. The strategy is star. Nearby tries to create the connection over Wifi, but the connection either a) doesn't even get created or b) when one device is…
Johannes
  • 163
  • 11
3
votes
2 answers

Does google nearby use WiFi P2P

Having read the announcement about google nearby 2.0 it's clear that WiFi connections are supported. Nearby Connections uses WiFi, Bluetooth LE & Classic Bluetooth under the hood to discover and establish connections to nearby devices. Or from…
Columbo
  • 6,648
  • 4
  • 19
  • 30
1 2
3
27 28