Skip to content

[android_intent_plus] Fix fallback to implicit intent#1136

Merged
vbuberen merged 1 commit intomainfrom
fix/intent_fallback
Oct 2, 2022
Merged

[android_intent_plus] Fix fallback to implicit intent#1136
vbuberen merged 1 commit intomainfrom
fix/intent_fallback

Conversation

@vbuberen
Copy link
Copy Markdown
Collaborator

@vbuberen vbuberen commented Oct 2, 2022

Description

Fix for #245 broke the functionality of safe fallback from explicit to implicit intent when package can't be resolved. This PR adds such functionality back.

Additionally updated Android Gradle plugin and used Gradle version.

Related Issues

Closes #919

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated the version in pubspec.yaml and CHANGELOG.md.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I am willing to follow-up on review comments in a timely manner.

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 a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

if ("launch".equalsIgnoreCase(call.method)) {
sender.send(intent);

if (intent != null && !sender.canResolveActivity(intent)) {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just moved this check from buildIntent() to be able to set package as null, so the system just opens a chooser.

@miquelbeltran miquelbeltran added Hacktoberfest Issues taking part in Hacktoberfest hacktoberfest-accepted labels Oct 2, 2022
@vbuberen vbuberen merged commit 68f9c96 into main Oct 2, 2022
@vbuberen vbuberen deleted the fix/intent_fallback branch October 2, 2022 16:24
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jan 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: android_intent example "fallback to implicit" does not work

2 participants