3

I am new to React Native development (for Android and iOS).

I am trying to transfer data between 2 mobile devices in offline mode (WiFi, Bluetooth or something else. QR codes no due to the data size limitations)

I found a good library react-native-wifi-and-hotspot-wizard and react-native-wifi-hotspot but it only supports Android, not iOS.

I am looking for a cross-platform (Android and iOS) data transfer library that can between 2 devices in offline mode.

Can anyone please suggest a library or some code tips?

Tom
  • 328
  • 3
  • 12
savita
  • 79
  • 4

2 Answers2

0

ANDROID

you can use react-native-wifi-p2p library

https://github.com/kirillzyusko/react-native-wifi-p2p

yarn add react-native-wifi-p2p

you can use sendFile and receiveFile functions from this library for transfer files/data between 2 mobile devices

IOS

for Ios, you can use https://github.com/lwansbrough/react-native-multipeer#senddata-recipients--callbackerr

Muhammad Numan
  • 23,222
  • 6
  • 63
  • 80
0

You can use my open source repo at https://gitlab.com/amir1gorji/gorji

There was a challenge to build such thing using React Native and I wrote the app in this repo.

Amir Gorji
  • 2,809
  • 1
  • 21
  • 26