-
Notifications
You must be signed in to change notification settings - Fork 55
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
AudiofileplayerPlugin breaks automatic plugin registration #63
Comments
I just pushed v 1.3 to pub.dev, which updates the plugin to use new Android embeddings. Please let me know if this fixes your problem. Also, as per your bug report, what are you doing differently in your app (in comparison to the audiofileplayer example app)? Are you instantiating something while the app is backgrounded? (That could cause a null Activity) And when you say, Isolate, I assume you mean the main thread (as Plugins cannot communicate on any other thread/isolate, so if you are trying to init or communicate with a plugin on a new isolate, it is not expected to work). |
Nice! it works now! So, I used android_alarm_manager too in my app, but I didn't combine it with audiofileplayer directly. The problem was when android alarm manager was triggered, it instantiated FlutterEngine just said Well, thank you for your fast response, cheers! |
@monkeyswarm I can see the line in AudiofileplayerPlugin.java:142 line is still there: and because we're running in an Isolate there's no activity, so the NullPointerException still applies. Or am I missing something? |
Hi,
I have an issue with audiofileplayer plugin registration, when this plugin is invoked automatically by the isolate, it always crashes and makes other plugins can't be loaded as well.
I've traced the exception and here's where the crash came from:
In line 132, it returned null when calling
registrar.activity()
and it crashed withNullPointerException
when accessinghashCode()
, is there no null check there? Because inShimRegistrar
, that method may returnnull
whenactivityPluginBinding
is anull
too.And this is my environment:
I use latest plugin version 1.2.0, any workaround or a fix for this? Thanks.
The text was updated successfully, but these errors were encountered: