Android/iOS Peer-To-Peer architecture

ⅰ亾dé卋堺 提交于 2019-12-18 10:03:02

问题


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

Possible technologies

  • Bluetooth
    • GameKit iOS only?
    • Bluetooth P2P library, with Wi-Fi and GPS?
  • Wi-Fi
    • Wifi Direct?
    • Bonjour zeroconf?

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

  • Peer to peer connection in android
    • Android since API 14 and no support for cross-platform usage
  • Android Peer-to-Peer technolog
    • ANI (https://github.com/pocmo/Android-Network-Intents) only network intercepted
    • DIAL,MOVL only wi-fi
  • Android Peer-to-Peer Connection
    • C2DM/GCM requires mobile data
  • Can Android do peer-to-peer ad-hoc networking?
    • Direct Wifi only
  • Peer-to-Peer video from iOS to Android?
    • Requires network data and server
  • http://forum.unity3d.com/threads/141469-Wifi-Bluetooth-Multiplayer-on-iOS-and-Android
    • GameKit is compatible only with other GameKit
  • https://www.alljoyn.org/docs-and-downloads/documentation/alljoyn-android-environment-setup-guide-rev-d
    • Bluetooth is not well supported, and requires rooting of device.

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?


回答1:


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




回答2:


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




回答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.




回答4:


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



来源:https://stackoverflow.com/questions/17502818/android-ios-peer-to-peer-architecture

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!