4

This question follows on from Unity3D -- Send message to other mobile phones in the same vicinity

However, I made mistake of restricting to Unity3D.

So I would like to re-ask the question without that constraint.

Let us say we have 20 mobile phone users in a cave (so no Wi-Fi networks / isGPS)

One user hits a button, and every other user's screen flashes, (within a few milliseconds)

How to accomplish this?

What if everyone is using an iPhone? What if there is a mix of iPhone and android users? Finally, is there any solution that would cover a wider range of phones?

Community
  • 1
  • 1
P i
  • 29,020
  • 36
  • 159
  • 267

3 Answers3

2

You should have some network so that mobiles can share some data. Bluetooth can have maximum of 10 m distance coverage (depends upon devices though). Since, all mobile are running same app they should be linked to a network and communicate. Please Check: http://developer.android.com/samples/BluetoothLeGatt/index.html

You can create one device as server and communicate among other devices. https://github.com/polyclef/BluetoothChatMulti

asok Buzz
  • 1,876
  • 3
  • 24
  • 50
1

If you have installed the app on all of the devices then in all probability yes, if the device supports push (pretty much any smartphone) then you can use the push service to synchronize the devices based on geofencing (ie, 10m from my location), there are some other discovery routes you could try to (without using the B word) pinging other devices

the app would need to be able to provide some sort of server service if it was to create its own private network based on the IP addresses of the devices it found nearby, as those devices would have to connect to that phone acting as a server. the network interface shouldn't be important, but connecting the satellite devices to the server should be. You could try doing it based on which device can provide data services, aka hotspot. You can easily connect devices to networks programmatically.

at that point your faced with the classic client server problem. There is going to be a huge amount of work to get devices configured, network creation, client server infrastructure if it has to be done without data, packet optimization. Very expensive and very high risk depending on how many restrictions there are.

TombMedia
  • 1,962
  • 2
  • 22
  • 27
0

Search for How to make a html5 group chat and then build on that example.

Possibly send commands to the chat delimited by a / character where a javascript could then execute the command.

Good Luck with your design. Danny117

danny117
  • 5,581
  • 1
  • 26
  • 35