Skip to content
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

docs(android_alarm_manager_plus): Fix example and docs to explain required annotation #1229

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

vbuberen
Copy link
Collaborator

Description

Fix for a problem with android_alarm_manager_plus not working in release mode on Flutter 3.3.0 and newer.
It seems that due to recent changes to a tree-shaking quite a few plugins started to have issues with isolates when app is built in release mode.

The main requirement is to annotate the callback function with @pragma('vm:entry-point') in the app where the plugin is used. So I have updated the README and docs to mention this requirement.

Here is the list with similar issues or issues on topic:
flutter/flutter#109248
firebase/flutterfire#9446
https://www.reddit.com/r/flutterhelp/comments/x3tq8l/package_not_found_in_release_but_there_in_debug/

And this is the issue about missing documentation update about the change that broke multiple plugins in the community:
flutter/website#7564

Related Issues

Closes #1077

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the pubspec.yaml files.
  • All existing and new tests are passing.
  • The analyzer (flutter analyze) does not report any problems on my PR.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.

@miquelbeltran
Copy link
Member

miquelbeltran commented Oct 13, 2022

The pragma vm entry solution was already mentioned before: #1061 but I wasn't sure if it worked or not.

Thanks for adding this to the docs!

@vbuberen
Copy link
Collaborator Author

but I wasn't sure if it worked or not.

I have tested on our example app and it worked after adding this annotation.

@github-actions
Copy link

Visit the preview URL for this PR (updated for commit c46f7a3):

https://flutter-community-plus--pr1229-update-alarm-manager-ha460d6b.web.app

(expires Thu, 27 Oct 2022 09:47:53 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android_alarm_manager_plus documentation Improvements or additions to documentation Hacktoberfest Issues taking part in Hacktoberfest hacktoberfest-accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Question]: Alarm Manager Plus Not Working on Release App
3 participants