flutter_nearby_connections icon indicating copy to clipboard operation
flutter_nearby_connections copied to clipboard

Add new features and fix bugs on Android and iOS.

Open leechupe opened this issue 10 months ago • 1 comments

Bug: Android Side: Due to the Android framework version, some environment values have to be modified:

  1. Remove the package tag in AndroidManifest.xml.
  2. Set the service name to an absolute path in AndroidManifest.xml.
  3. Change the application name to the applicationName reference in AndroidManifest.xml.
  4. Upgrade com.android.tools.build:gradle version to 8.1.3
  5. Change the minSdkVersion to the flutter.minSdkVersion reference.

IOS Side:

  1. Add a _mp-connection._udp value to the field of the Bonjour service array in info.plist for fixing the NSNetServicesErrorCode = "-72008".

Flutter Side:

  1. Modify the serviceType from 'mpconn' to 'mp-connection' to address the problems IOS devices can't find.

New Features:

  1. Add a new feature for sending files.
  2. Add camera access requirement and the Image_picker lib for display file transfer feature.

Android Side:

  1. Add a new function to send a file by Payload.fromFile().

IOS Side:

  1. Add a new methodChannel and function to send a file by FlutterStandardTypedData type.
  2. Add the camera access requirement to the info.plist.

Flutter Side:

  1. Add a new button to the AlertDialog to send a file by the camera.
  2. Check whether the data is a file or string in the dataReceivedSubscription function.

leechupe avatar Apr 24 '24 10:04 leechupe

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.

leechupe avatar May 16 '24 07:05 leechupe