I need a mesh networking library or API to work on iOS and Android so that messages can be sent through wifi or/and BLE or/and sounds even if no internet connection is available within an area of 100 square meters with walls. This includes communication without internet between Android and iOS mobile devices. This may be possible with solutions such as for example:

My question is whether any of these solutions or any other can be used with the same code for iOS and Android using Flutter.

There is no visible mention of any Flutter integration for p2pkit.io. I am not sure whether this means that this cannot be used with Flutter.

There is a Flutter plugin for bridgefy.me but it was created and last updated end 2018. Things evolve so fast in this area that I wonder whether this is still functioning more than half a year later.

There is a recently updated Chirp for Flutter SDK but it is in beta state and I wonder whether Chirp allows communications even if there are walls.

There doesn’t seem to be any Flutter solution nor any clear pricing for lisnr.com .

Edit 2019 08 03:

I tried the Bridgefy Flutter plugin example and so far I got:

1) A compilation error for Android which forced me to edit file FlutterBridgefyPlugin.java so that result.success(); was replaced by result.success(result); (which doesn't make much sense IMHO but it compiles).

2) An error executing the example app after the above mentioned edit on two Android devices:

E/MethodChannel#flutter_bridgefy(17112): Failed to handle method call
E/MethodChannel#flutter_bridgefy(17112): java.lang.IllegalArgumentException: Unsupported value: io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1@a9d58ce
E/MethodChannel#flutter_bridgefy(17112):    at io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:294)
E/MethodChannel#flutter_bridgefy(17112):    at io.flutter.plugin.common.StandardMethodCodec.encodeSuccessEnvelope(StandardMethodCodec.java:57)
E/MethodChannel#flutter_bridgefy(17112):    at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:225)
E/MethodChannel#flutter_bridgefy(17112):    at me.bridgefy.flutterbridgefy.FlutterBridgefyPlugin.onMethodCall(FlutterBridgefyPlugin.java:21)
E/MethodChannel#flutter_bridgefy(17112):    at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
E/MethodChannel#flutter_bridgefy(17112):    at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
E/MethodChannel#flutter_bridgefy(17112):    at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:643)
E/MethodChannel#flutter_bridgefy(17112):    at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter_bridgefy(17112):    at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#flutter_bridgefy(17112):    at android.os.Looper.loop(Looper.java:136)
E/MethodChannel#flutter_bridgefy(17112):    at android.app.ActivityThread.main(ActivityThread.java:6776)
E/MethodChannel#flutter_bridgefy(17112):    at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_bridgefy(17112):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
E/MethodChannel#flutter_bridgefy(17112):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)

3) The iOS example leads to the following output on the console:

Event: reported Preloaded license is not valid
Event: reported Transmitter needs to establish online communication, the transmitter will start after this.

Even though, I added the license number that I was given from the bridgefy site.

4) I am not sure how to properly use this example app. The label in the middle of the screen just says "Running on: Unknown". The _flutterBridgefy object doesn't seem to provide any way to communicate with any other device. I don't know how to transfer information from one device to another.

My conclusion regarding the Bridgefy Flutter plugin example is that I cannot rely on it for now to do what I need to do.

Edit 2019 08 05:

Here are my results with chirp.io :

I got the chirp.io Flutter example app running on Android device but after a few seconds, the app crashes. However, it works just fine on iOS device and iOS simulator. I was even able to see some data transmitted from the simulator to the device. Though, as this is based on sound, the devices have to be close to each other. This would not go through walls which is what I would need.

My ideal Flutter communication framework would consist in:

  • Internet based communication
  • Fallback to local network communication without the need for a hardware server deployment
  • Fallback to BLE communication
  • Fallback to sound based communication
  • Share your code please. Id like to collaborate
    – errolflynn
    Sep 17, 2019 at 0:45
  • Thanks for your interest @errolflynn . Sadly, I don’t have time to develop the solution myself. Thus, at the moment, I am just trying to use a CoTURN server with flutter WebRTC library for my apps communications. This is far from what I would need but this is the closest I found so far (at least in promises). If I find a better solution or if I start developing one, I will update this post. Sep 17, 2019 at 4:52


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.