Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multipeer connectivity for android

So I'm trying to build an app that uses iOS 7 Multipeer Connectivity framework on the iPhone, but I'm now trying to connect the iPhone to an Android device using the same technology. Is this possible?

Is there something like Apple's multipeer connectivity framework for Android, or is there any way of connecting an iPhone to an Android device without using internet or mobile services, but using Wifi and bluetooth only?

like image 689
lei.cc Avatar asked Mar 31 '14 14:03

lei.cc


People also ask

What is P2P CONNECTION in Android?

Wi-Fi Direct (also known as peer-to-peer or P2P) allows your application to quickly find and interact with nearby devices, at a range beyond the capabilities of Bluetooth. The Wi-Fi Direct (P2P) APIs allow applications to connect to nearby devices without needing to connect to a network or hotspot.

What is peer device?

Wi-Fi Peer-to-Peer (P2P) allows Android 4.0 or later devices with the appropriate hardware to connect to each other via Wi-Fi without an access point.

Can you WIFI direct from Android to iPhone?

Connect your Android phone to the same Wi-Fi network as your iPhone. Then launch the internet browser on the phone to access the above iPhone Wi-Fi file transfer address, you will then get the access to all kinds of files and folders from the iPhone file manager on your Android device.

How do I turn on WIFI Direct on my iPhone?

Select Wi-Fi in the iPhone's settings to turn on the Wi-Fi. Tap Direct-xx-BRAVIA on the iPhone's screen to display the password input screen. Enter the WPA key (password) displayed on the TV screen, then tap Join. Allow a few minutes for the connection to be established, and the Settings screen to appear.


2 Answers

Maybe a bit delayed, but technologies have evolved since so there is certainly new info around.

As iOS has yet to open up an API for WiFi Direct and Multipeer Connectivity is iOS only, I believe the best way to approach this is to use BLE, which is supported by both platforms (some better than others).

On iOS a device can act both as a BLE Central and BLE Peripheral at the same time, on Android the situation is more complex as not all devices support the BLE Peripheral state. Also the Android BLE stack is very unstable (to date).

If your use case is feature driven, I would suggest to look at Frameworks and Libraries that can do cross platform p2p for you, without you needing to build it up from scratch.

For example: p2pkit.io or google nearby

Disclaimer: I work for Uepaa, developing p2pkit.io for Android and iOS.

like image 73
p2pkit Avatar answered Oct 15 '22 04:10

p2pkit


There is currently no way to connect with android over bluetooth, but you can connect with wifi using the Multipeer framework I believe. I know the developer of spaceteam accomplished this with his game. I'm not sure how exactly but it is possible.

like image 38
SirCharlesWatson Avatar answered Oct 15 '22 05:10

SirCharlesWatson