flutter_nearby_connections
flutter_nearby_connections copied to clipboard
Add new features and fix bugs on Android and iOS.
Bug: Android Side: Due to the Android framework version, some environment values have to be modified:
- Remove the package tag in AndroidManifest.xml.
- Set the service name to an absolute path in AndroidManifest.xml.
- Change the application name to the applicationName reference in AndroidManifest.xml.
- Upgrade com.android.tools.build:gradle version to 8.1.3
- Change the minSdkVersion to the flutter.minSdkVersion reference.
IOS Side:
- Add a _mp-connection._udp value to the field of the Bonjour service array in info.plist for fixing the NSNetServicesErrorCode = "-72008".
Flutter Side:
- Modify the serviceType from 'mpconn' to 'mp-connection' to address the problems IOS devices can't find.
New Features:
- Add a new feature for sending files.
- Add camera access requirement and the Image_picker lib for display file transfer feature.
Android Side:
- Add a new function to send a file by Payload.fromFile().
IOS Side:
- Add a new methodChannel and function to send a file by FlutterStandardTypedData type.
- Add the camera access requirement to the info.plist.
Flutter Side:
- Add a new button to the AlertDialog to send a file by the camera.
- Check whether the data is a file or string in the dataReceivedSubscription function.
Dear All:
I got a device-connected status problem when I used it on my project.
I found the problem is that the devices didn't stop.
So I added a new methodChannel function named stop_all_endpoints for any needed situation stopping all endpoints.
The original version only used it in the OnDestory function.
I hope it will be helpful.
Thank you.