mannprerak2 / nearby_connections

Flutter plugin (android) for sharing bytes and files Offline, (Based on the android Nearby Connections API)
https://pub.dev/packages/nearby_connections
BSD 2-Clause "Simplified" License
93 stars 30 forks source link

Is it possible to set it to connect only through Bluetooth without connecting to wifi? #54

Closed kimdindoo closed 1 year ago

kimdindoo commented 1 year ago

Hi, Thanks for making such a nice library. Is it possible to set it to connect only through Bluetooth without connecting to wifi?

mannprerak2 commented 1 year ago

The library has no input option which allows us to decide the communication medium. So it's not feasible directly.

However I found this on SO

Change from 'Strategy.P2P_STAR' to 'Strategy.P2P_CLUSTER

it's probably worth a try, but I cannot say if this behaviour is consistent across devices or android versions SO link: https://stackoverflow.com/questions/47273842/bluetooth-only-connection-with-nearby-communication

kimdindoo commented 1 year ago

Thank you for the quick reply. I also tested it after reading that article, and it seems to work well with Bluetooth connection.