3

It's been a year Google released the Nearby API. I need to use it to let users communicate together when nearby.

After checking this, I got frustrated:

To use this user has to be connected to internet (nearby messages), otherwise user has to be on the same WiFi/local network (Nearby connections). Right?

No way to make phones communicate nearby without internet and without hotspots/routers ?

Achraf Amil
  • 1,275
  • 16
  • 20
  • Check out this question:[Detecting another nearby android device via Bluetooth](http://stackoverflow.com/questions/6353188/detecting-another-nearby-android-device-via-bluetooth) – Imran Ali Aug 17 '16 at 19:08
  • AFAIK, the API Andrew Bunner is using requires the user either to have Internet or be on the same local network. – Achraf Amil Aug 18 '16 at 15:13
  • Did you eventually find a way to use Nearby Messages without Internet? – Dake Nov 26 '16 at 09:45
  • Actually no, I gave up on that project and focused on something else... If you ever find a solution, don't forget to add an answer here. – Achraf Amil Nov 26 '16 at 12:59
  • I've just started looking for Google Nearby and stumbled in this limitation. :-/ I'll follow this question, though... – Luiz Eduardo Dec 28 '16 at 17:09

3 Answers3

2

Google Nearby Connections 2.0 was announced on July 31, 2017. It does support a direct connection between phones without WiFi Hotspot.

You can check out Google's announcement. https://android-developers.googleblog.com/2017/07/announcing-nearby-connections-20-fully.html?m=1

Nearby connections 2.0 API uses Bluetooth to detect and connect the nearby phone. I found the performance to be spotty during my testing with several different phones and tablets. I suspect that user will still run into Bluetooth pairing issues.

user1416682
  • 991
  • 1
  • 7
  • 8
0

Nearby Messages API must required internet connection.

If internet is not connected than Nearby.Messages.subscribe(...) & Nearby.Messages.publish(...) will gives you StatusCode=NETWORK_ERROR in ResultCallback.onResult(Status status).

If all mobile devices are connected with same WiFi/local network than also there must be internet connection is required through WiFi/local network.

Suppose, There are 2 mobile devices and both have internet connection (Check below 2 cases):

  1. If both device are near to each other (in the range) than only both can communicate.
  2. If both device are not near to each other (not in the range) than both can not communicate.
Mitul Varmora
  • 3,832
  • 1
  • 12
  • 21
0

I am looking for the same solution as you mentioned. I found this : Connecting Devices Wirelessly. from Android Developer site.

I am still reading it, but so far it sounds like what we were looking for.