kirillzyusko / react-native-wifi-p2p

Library that provide access for working with wi-fi direct (p2p) module in android.
164 stars 32 forks source link

Question: How to work with react-native-multipeer? #11

Closed qalqi closed 4 years ago

qalqi commented 4 years ago

Can you please illustrate how do we communicate with iOS devices with react-native-multipeer and Android devices with react-native-wifi-p2p?

kirillzyusko commented 4 years ago

@qalqi Do I correct understand, that you want to connect Android device with iOS using p2p connection?

qalqi commented 4 years ago

Yep

kirillzyusko commented 4 years ago

I'm afraid you can't... Because mutipeer connectivity cannot connect iOS and Android devices. It's not a react-native restriction - it's a platform restriction (since they are used different approach in realisation) :( You need to write your own implementation I think

qalqi commented 4 years ago

I was able to connect a Windows device, a macbook device and a iOS device to WIFI direct group created by createGroup Only thing I need now, at least in iOS device to be able to send a message to another android device or to android group owner

kirillzyusko commented 4 years ago

Hm, have you tried to call send function from react-native-multipeer? Or call sendMessage on Android side in order to send some data to iOS devices?

qalqi commented 4 years ago

iOS to iOS, peer advertising and connecting is working fine. Create a WIFI Direct group from one Android device and able to connect to it with WIFI Direct group passphrase then create a Multipeer iOS to iOS connection.

Now, Android to iOS is something I haven't been able to figure out.

kirillzyusko commented 4 years ago

I think, I can't help you with this issue, unfortunately. If you find a solution, please, write it here

kirillzyusko commented 4 years ago

@qalqi And also you can have a look on https://developers.google.com/nearby/

kirillzyusko commented 4 years ago

@qalqi I close this issue. If you find something interesting, please leave your comment here. Thank you in advance.

hajermay commented 4 years ago

iOS to iOS, peer advertising and connecting is working fine. Create a WIFI Direct group from one Android device and able to connect to it with WIFI Direct group passphrase then create a Multipeer iOS to iOS connection.

Now, Android to iOS is something I haven't been able to figure out.

please did you find a solution

hajermay commented 4 years ago

@qalqi i have the same situation and i like to know how can i test the react-native-multipeer on real device ios what should i use wifi or hotspot and also have you find a solution for send message from android to ios ??

kirillzyusko commented 4 years ago

As I can understand it's not possible. Even with usage native languages (not RN)

hajermay commented 4 years ago

As I can understand it's not possible. Even with usage native languages (not RN)

did you have any idea how to test multipeer on real device ?

kirillzyusko commented 4 years ago

@hajermay not really. If you want to test multipeer library (between two iOS devices), it's better to ask your question in issues of multipeer library. Also you may find it useful: https://stackoverflow.com/questions/28906948/peer-to-peer-android-and-ios-with-wifi-direct-multipeer-connectivity

hajermay commented 4 years ago

https://stackoverflow.com/questions/28906948/peer-to-peer-android-and-ios-with-wifi-direct-multipeer-connectivity

thanks @kirillzyusko ;)