Peer to Peer communication between iOS and Android devices
Asked Answered
S

4

6

So I am a relatively new iOS developer but thanks to Stackoverflow, i managed to get peer to peer data communication for my app working without the need of a server using gamekit/GKSessions. Basically, one iOS device acts as a server and others just connect to it to receive app specific data.

Now, the app is currently being ported on Android and I was wondering if there is a way that I can make an Android device connect to the iOS app and behave the same way as ios app does. Android developers suggested alljoyn to be an optimum solution for android but that doesn't seem to be available yet for iOS.

Please suggest if you have any ideas on this front. If there is a solution that involves rework on iOS side as well then I am open to it!

Sororate answered 9/7, 2012 at 19:34 Comment(4)
I don't see why there would be a problem just implementing a similar solution for Android as you already did for iOS assuming you just used standard TCP or UDP... Can you provide a few details on what you implemented for iOS and why you think something compatible with that isn't super-straightforward for your Android port?Allergen
kabuko- The peers discovered through gamekit framework in ios has a requirement that the app on the other end should carry same bundle identifier. Basically, they want an app to communicate with its own instance installed on other device. So with android, i dont think it would even discover the device.Sororate
but I thought you said you managed to get it working without gamekit? Or is that just without a gamekit server?Allergen
yes its without a server and communicates on adhoc wifi network ! Sorry for the ambiguity earlier... i did it using gamekit so I wont need any server in between ! Hope this makes it clearer..Sororate
S
1

I didn't have time to wait for alljoyn to be launched for iOS and sensing no other feasible solution that would fit on my timeline, I implemented a relay server in between to achieve this.

For others though, iOS binding is now available for alljoyn (www.alljoyn.org). I haven't tried it yet but the android version of my app works with alljoyn and it works perfectly so I assume it will do the same for iOS as well.

One limitation to be considered using alljoyn is that it cannot communicate between devices that are behind different subnets.

Sororate answered 30/1, 2013 at 13:0 Comment(0)
I
4

In case, you or others tackling the same question in Jan 2013 needs an answer, AllJoyn is now ready for iOS too, amongst other platforms.

https://www.alljoyn.org/docs-and-downloads

Intussuscept answered 29/1, 2013 at 10:39 Comment(0)
F
1

Venkat i suggest you to read and get some detailed information regarding P2P. This is a Good source, because you might get stuck if both devices are behind multiple Nat. but if your willing to go forward there is always a way. My suggestion would be an Relay, but you need to have a server, but the relay behaves like P2P. Look at the source above to get ideas.

Fifty answered 13/7, 2012 at 10:3 Comment(0)
S
1

I didn't have time to wait for alljoyn to be launched for iOS and sensing no other feasible solution that would fit on my timeline, I implemented a relay server in between to achieve this.

For others though, iOS binding is now available for alljoyn (www.alljoyn.org). I haven't tried it yet but the android version of my app works with alljoyn and it works perfectly so I assume it will do the same for iOS as well.

One limitation to be considered using alljoyn is that it cannot communicate between devices that are behind different subnets.

Sororate answered 30/1, 2013 at 13:0 Comment(0)
U
0

I think there is a limit of max peer to multiple peer connectivity (max 8 peers) derived by IOS and Android, there is no connectivity tested using alljoyn between IOS and Android devices

Unhook answered 29/5, 2017 at 9:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.