Open Levi-Lesches opened 1 year ago
Is there any way to do it manually?
You would need to add a new method to the Android method channel, by adding an else-if right here: https://github.com/jpnurmi/flutter_libserialport/blob/e9c1fd940d26b2fc1674d5cb724027245c0ed094/android/src/main/kotlin/org/sigrok/flutter_libserialport/FlutterLibserialportPlugin.kt#L25-L31
and then call that method on the Dart side by following the instructions here
If you get that working, maybe consider submitting a PR?
@Levi-Lesches Thanks, I ended up using the usb_serial
plugin instead. Just a note to others thinking of doing the same - that plugin also doesn't support the Android permission handling correctly with the current version on pub.dev, but with the latest commit (c20e1e6e171137db4b52413dac14333653f07905) from Github it does.
The Android docs say to explicitly request permission before trying to use Serial functionality. Unfortunately, this is not something that can be done in the Manifest but must be done using Java/Kotlin, like
package:usb_serial
does.Are there any plans to support that here?
Did it worked for you?. If so it will be nice if you can you add a pr for that and tag this issue. usb_serial only supports Android and I prefer a package that can support multiple platforms like this one.
Turned out my use-case of serial on Android wasn't so strong so I dropped it for now, but I would like to see this implemented here as well.
The Android docs say to explicitly request permission before trying to use Serial functionality. Unfortunately, this is not something that can be done in the Manifest but must be done using Java/Kotlin, like
package:usb_serial
does.Are there any plans to support that here?