41

This is kind of wide question, I found many information about this topic.

Possible technologies

Neither of these does currently have a fully-implemented peer-to-peer library, or I haven't found such.
In fact I'm not interested in any kind of gaming library (and I don't target such issues)

Questions I'd considered

I'd like to efficiently communicate between as many devices as possible, without need of using mobile data (3G,HS*PA,LTE) or WIFI AP as intermediate point.
And not connecting people over large distances, really just like a PAN over Bluetooth.

Thus, what features I'd require to have

  • Totally OFFLINE (not requiring any mobile data services or wifi AP)
  • Cross-platform compatibility (Android, iOS)
  • Mobile OS backwards compatibility (Android since 2.3, iOS since 5.1.1)

Features I'd like to have

  • Route optimization (OSPF, MME, ...)
  • Not requiring devices to authorize to network (see Android insecure BT RFCOMM)
  • Possible wrapping up-to tens of users (20-30 max imo, or more if possible)
  • If needed, network could possibly choose its own leader (server node) ?

Is there currently anything I could use for mentioned features?

Community
  • 1
  • 1
Marek Sebera
  • 39,650
  • 37
  • 158
  • 244
  • 4
    Bluetooth has a limitation of upto 7 devices. have you considered using Alljoyn which is available in iOS and android, bluetooth is not supported in iOS and in later releases of Andorid but they are working on Wi-FI direct.. check this [link](https://www.alljoyn.org/), check the developers forum[here](https://www.alljoyn.org/forums/developers), hope it will help you – ashish Jul 07 '13 at 05:54
  • Did you find good enought solution? – Maxim Korobov Dec 28 '13 at 09:32
  • For IOS, there's the massive limitation of needing to exit the app and go into settings to choose which WiFi network you are connected to. Otherwise I'd for some sort of WiFi network being served through a single device. On Android of course this is not a problem. I'm working on something similar and I'm going the Bluetooth route for lack of a better alternative on IOS. – nflacco Dec 29 '13 at 20:33
  • @MaximKorobov sorry, no, project was stopped, as there was no business acceptable solution (which of course doesn't mean there weren't solutions suitable different needs) – Marek Sebera Dec 29 '13 at 22:15
  • @nflacco yes, that's one more consequence of the problem, I'm certainly willing to hear back from you, if you manage to work out some fine solution :-) Good luck ! – Marek Sebera Dec 29 '13 at 22:15
  • Did someone try AllJoyn SDK? https://www.alljoyn.org/announcement – Maxim Korobov Dec 30 '13 at 10:22
  • It's ok. Looks like simple UDP broadcasting on LAN. – Maxim Korobov Jan 17 '14 at 17:34
  • This is not an easy task to solve within this question. I have implemented an app using wifi to send files across multiple devices(multiple OS). For that I'm using the Client Server architecture & send through the client's ip address & a port. My app is not simple to copy & paste the code here. sorry for that. – DilumN Apr 14 '14 at 03:20
  • I tried to set up data exchange between iOS & Android over Bluetooth about a year ago. The only way to connect iOS & Android via Bluetooth is Bluetooth LE (Low Energy). Unfortunately, Android didn't support BLE well a year ago, so I couldn't set up data exchange. Maybe it works better now. – Nikolay Mamaev Jun 16 '14 at 08:33
  • Note that currently Alljoyn over Wifi doesn't work in Wifi environments where client isolation is enabled, which excludes it from practical use in many large organisations. (Older versions of it did, but the feature was removed around the time the AllseenAlliance took over the product development from Qualcomm.) – user2067021 Feb 11 '15 at 03:32
  • 1
    Hi Marek, I wonder if you have found a solution for this? – Out Of Office Apr 27 '16 at 12:46
  • 1
    did you find any solution for this ... cross platform app communication – KavyaKavita May 25 '17 at 05:01
  • I have a similar problem - question https://stackoverflow.com/questions/17502818/android-ios-peer-to-peer-architecture - but didn't find any solution yet. – Muhammad Usman Bashir Jan 19 '20 at 19:36

4 Answers4

5

I know google just came out with a cross platform api for ios and android devices to communicate with each other. I don't know what you're exactly looking for but this one lets you pass small binary payloads between Android and IOS devices. they don't have to be on the same network at all either or connected to the internet. I'll include the link just check it out.

https://developers.google.com/nearby/messages/overview

Ozvengrad
  • 302
  • 5
  • 10
  • 5
    Nearby Messages does require internet connectivity. You're probably talking about Nearby Connections which is totally offline but not cross-platform. – Jamol Dec 26 '17 at 10:39
3

Open Garden is developing this sort of technology and implement it in their app, Firechat. Testing the app, we found that Android-to-Android connections worked only over Bluetooth, iPhone-to-iPhone worked with bluetooth or wifi, and Android-to-iPhone only works if the phones are connected to the same network. Here's a link to their sdk which should be out soonish: https://opengarden.com/sdk

Austin
  • 1,087
  • 3
  • 14
  • 27
3

I'd look into WebRTC datachannels which has native support for both iOS and android. You can also include desktop browsers as peers with WebRTC.

Lightbeard
  • 4,011
  • 10
  • 49
  • 59
2

Currently only OpenGarden's FireChat is one of the only major players doing this. They do provide a mesh-kit sdk which currently I think you need to Apply for.

There is another project which has been kinda of shakey, but I heard was suppose to have a release coming really soon: The Thali Project

johnny 5
  • 19,893
  • 50
  • 121
  • 195