-
Notifications
You must be signed in to change notification settings - Fork 73
Update MicStreamPlugin for Flutter 3.29.0 Compatibility #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
error: cannot find symbol import io.flutter.plugin.common.PluginRegistry.Registrar;
|
Hi, I very much appreciate your efforts. |
|
Hi, |
|
Hi, I've made a branch to bump the flutter version and all its android dependencies up: fix/100/upgrade-api It contains your changes already (was easier to test that way). I'm ready to merge & publish this branch as soon as you confirm that you understand and accept that your changes are going to irreversibly be published. Thank you again for your initiative and effort in keeping this project alive-ish! Best regards |
|
Hello ! @anarchuser is it possible to merge this one? |
Hi, I’m sorry for replying to you so late. I’ve been going through a busy period and couldn’t get back to you earlier because I hadn’t fully completed my tests and wasn’t entirely sure about the results. I understand what you’ve said, and at the moment, I’m not experiencing any issues while using the package. Still, I’d like to be absolutely certain, so I plan to run one final test. As soon as I confirm everything is working fine, I’ll get back to you as quickly as possible. Best regards, |
|
Hi, @GuillaumeBouxin if it's very urgent you can always clone this repo and use this PR instead of a version. Best regards |
|
Hi @anarchuser, I think publishing it as a development version is a great idea and would definitely help. Thanks! Best regards, |
|
Done. Should be visible within the next ten minutes |
|
Hi, any update on this? |
Hello,
While using the mic_stream library with Flutter 3.29.0, I encountered a compilation error on Android due to the use of the deprecated PluginRegistry.Registrar API, which has been removed in modern Flutter versions (with V2 embedding). To resolve this, I’ve updated MicStreamPlugin.java to use the FlutterPlugin API instead.
Changes made:
Removed the PluginRegistry.Registrar import and registerWith(Registrar) method.
Integrated the plugin with the FlutterPlugin interface using onAttachedToEngine and onDetachedFromEngine.
Defined EventChannel and MethodChannel objects at the class level to improve lifecycle management.
Preserved the existing microphone streaming logic (e.g., runnable, onListen, onCancel) unchanged.
This update makes the library compatible with Flutter 3.29.0 and later versions. I’ve tested it locally, and it works without issues. Merging these changes into the main repository would help the community use this library with current Flutter releases. I’d appreciate your review—thanks!