Closed Alystrasz closed 2 years ago
Thanks so much. I read through https://flutter.dev/docs/development/packages-and-plugins/plugin-api-migration but got stuck when BluetoothEnablePlugin
needed to implement FlutterPlugin
and ActivityAware
because Android Studio IDE cannot import majoirty of the flutter specific package imports and I didn't have enough experience to do this blind.
Yeah, this is the first time I migrate a plugin to V2, so I encountered same problems :smile:
I tried to open the android
folder as an Android project with Studio, but even with this, the IDE struggled to correctly import Flutter packages; I succeeded only thanks to the javadoc...
https://api.flutter.dev/javadoc/io/flutter/embedding/engine/plugins/FlutterPlugin.html https://api.flutter.dev/javadoc/io/flutter/embedding/engine/plugins/activity/ActivityAware.html
I'm trying to convert https://pub.dev/packages/share_files_and_screenshot_widgets now. I figured that one way is to right click the android folder in the project tree in Android Studio and it has a menu to open up the Android part of the project only. That kicks off a gradle build. Than the gradelw files are missing for the plugin and the example as well. That can be generated by gradle wrapper
command, however in my case I had extra difficulty that my Linux (Devuan) had a too old gradle. Interesting journey. I'm learning from your code now.
@huitingyeong ?
@huitingyeong are you willing to review this?
I currently have access to Apple hardware, so I'd like to continue working on your package by adding iOS support (https://github.com/Alystrasz/bluetooth_enable/tree/ios).
Hey @Alystrasz what's the reason for the close? I'm directly depending on your fork in my yaml, so if you plan to take it down I ll fork it.
Hello @MrCsabaToth, I cannot wait anymore for the author to accept the PR, so I decided to publish my own fork on the store: https://pub.dev/packages/bluetooth_enable_fork
If you need this feature in particular, I saved the repo state on this branch: https://github.com/Alystrasz/bluetooth_enable_fork/tree/chore/android-v2-embedding
Upgrading both library and example app to use latest Flutter APIs. The idea is to fix #7.