-
-
Notifications
You must be signed in to change notification settings - Fork 456
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
Compatibility with other plugins #53
Comments
This seems to be the type of error mentioned at the bottom of the
If you prefer to use flutter_inappbrowser and are willing to submit a bug report to that project, here is a little bit of an explanation of what's going on. When you use When I look at the code for flutter_inappbrowser, I see that it's also storing the registrar in a static field which is problematic. Since there are two registries, registerWith will be called twice on the same plugin, one in each context, and you don't want the second one (probably the service) to override the first one (probably the activity). So that should be changed to an instance field also. There seem to be many other static fields too, so the plugin author may need to figure out which ones need to be distinct within each plugin registry and change them to instance fields. Anyway, I recommend just using webview_flutter ;-) It's still useful to know how this works, though, because that error message you posted over on the iOS issue, and the reason why you had to upgrade your Flutter to the latest version to get the newest APIs, has something to do with iOS's equivalent to what I described above. This new iOS API apparently brings the iOS implementation of Flutter background execution on par with the Android implementation so that it is possible for background dart code on iOS to load plugins via the registry. |
@ryanheise Thank you for the explanation, its very helpful. I will take a look at I have submitted a bug report to As a last resort, I will fork |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with audio_service. |
I am using the flutter_inappbrowser plugin in my project, as well as audioservice.
If I open a browser view before ever starting the audio service, all is okay, but if I start the audio service, then open the browser, the app crashes with the error:
The call stack stops around here:
I suspect this could be related to audioservice requiring a custom MainApplication class, but I don't have much Android development experience, so any insight/help would be much appreciated.
browser plugin: https://github.com/pichillilorenzo/flutter_inappbrowser
The text was updated successfully, but these errors were encountered: