Nearby Messages (100 days of Google Dev)

Google for Developers · 50K views · 2015 · 4:23

Open on YouTube

Software (other)Embedded systems & DIY electronicsdemodated

Why Stack Overflow recommends it

Stack Overflow users link it when answering questions about how Nearby Messages behaves, such as ultrasonic range limits, background publish and subscribe rules, and how it differs from Nearby Connections.

Recommended by 3 people across 3 different months, 2015 to 2020.

What it is

A 4-minute Google Developers video from the 100 Days of Google Dev series in which Andrew Bunner introduces the Nearby Messages API. It lets Android and iOS devices exchange messages over short distances, aimed at ad-hoc groups, collaborative sessions and sharing resources in a shared space.

What people said

Recommends kaho · 2015-08 · Stack Overflow · on “Google New Play Services 7.8 Nearby Message via Ultrasonic or Inaudible example?”

I think you can set the distance to short to use only ultrasonic mode, as it is mentioned in this dev byte youtube video [this video]

Recommends Urilicious · 2016-06 · Stack Overflow · on “Nearby released publications still received on iOS devices”

I believe so. In my AppDelegate.applicationDidEnterBackground I am setting all publishers, subscribers and even the GNEMessageManager to nil, so there wouldn't be any GNS activity in the background (this is done to follow the nearby tips given at the video here [this video] which say to unpublish and unsubscribe on an Android onPause). My debugging also shows my publisher is nil at that time.

Recommends afarre · 2020-12 · Stack Overflow · on “Google Nearby Connections - Timed Advertising”

You could set up a thread, with a timer. If the timer reaches 0, and you are advertising, then call the corresponding stopAdvertising() method. Besides this, keep in mind that the user should be aware when the device is advertising via an icon or a special screen. This is stated in this video [this video] (they talk about nearby messages, rather than connections, but the best practices still apply). What I mean, is that it would be odd to have the user waiting for 5 minutes in the same screen while advertising. Most likely he quits before the 5 minute window has passed, at which point you must also stop advertising. If you think in your application the user might stay in the advertising screen fo

Cites Elye · 2016-05 · Stack Overflow · on “Is it mandatory to be in same wifi network to communicate using NearBy Api?”

Check out [LINK] , there are at least 2 types of nearby now. The Nearby Connection feature will required Local Network. The Nearby Messages can work across network, as long as both are connected to the internet. Check [this video] and [LINK]

Cites afarre · 2020-12 · Stack Overflow · on “Google Nearby Connections Limit to Earshot Distance?”

Nearby connections uses bluetooth, BLE (Bluetooth Low Emissions) and WiFi. This signals can't be adjusted to reach a certain distance. Nearby messages, on the other hand, also uses ultrasounds which can limit the phone's reach to a much shorter distance. See this video [this video] . It's also stated in the documentation of messages. So your options are either fully offline connections without distance setting, or online messages with distance setting. Note that messages is not fully online, it only publishes the message to be shared in a google server. The key necessary to retrieve that message is sent offline between users.