1

I am developing an application in flutter where people in the vicinity can connect to each other in a single room and exchange messages. The app should work like this:

  • A user creates the room (Advertiser)
  • All other users (Browser) connect to the advertiser.
  • Once connected, you exchange messages passing through the advertiser.

The perfect package to do this is google connect nearby: https://pub.dev/packages/flutter_nearby_connections

But it only works between android-android and ios-ios, it is not cross platform.

Now I have also thought of a solution that used the package with bluetooth, but I don't think it is possible to make ONLY the Advertiser user show himself to the others, avoiding that during the search everyone is seen and not knowing who to connect to.

If anyone has any advice for the realization of such a cross platform structure, (avoiding databases) it would be of great help!

Thank you!

John
  • 313
  • 4
  • 17

1 Answers1

0

Well you don’t really get many choices if you’re not all connected to the same network. If you are, use pub.dev/packages/bonsoir for discovery and HttpServer and HttpClient in dart:io for communication.

If you’re not connected to the same network, you will need to use BT LE. No other way to do this (that I know of, I’m sure someone much smarter than me knows a way :P)

MD. RAKIB HASAN
  • 3,670
  • 4
  • 22
  • 35
Aneesh
  • 1
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – primo Nov 27 '21 at 13:14