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

[quick_actions] Add guidance for correcting task management/back press behavior for apps with launcher activities #7686

Merged
merged 8 commits into from
Sep 24, 2024

Conversation

camsim99
Copy link
Contributor

@camsim99 camsim99 commented Sep 23, 2024

What

Adds a note about correcting the task management/back press behavior for apps that use launcher activities to the README. Fixes flutter/flutter#152883.

Why

If apps use a launcher activity, then launching shortcuts created by the plugin may not behave as expected because the plugin expects to launch the main FlutterActivity, for which it configures the launch mode, but instead launches the launcher activity, which it does not account for.

To fix this, the launcher activity itself needs to have a launch mode configuration that makes sense for the app. This involves changing the launch mode of the launcher activity in the manifest and/or using the right Intent flags to launch the main FlutterActivity.

From my work on the issue linked above, I found that if the launcher activity only launches the main FlutterActivity without any additional relevant logic, to maintain the exact same behavior of the plugin with/without a launcher activity, the launcher activity can use the singleInstance launch mode. So, I included a note about this. However, in more complex launcher activities, like b/357028168 that inspired the original issue, other modes may need to be used.

Pre-launch Checklist

@camsim99 camsim99 requested review from a team and stuartmorgan September 23, 2024 17:21
Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

LGTM, but I would also update the main package's README to link to the sub-package README; something like. "For more information on using this package on Android, see [the quick_actions_android README]."

Since it's just linking to the overall README, you could fold that into this PR, but it could also be a follow-up.

@camsim99 camsim99 added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 24, 2024
@auto-submit auto-submit bot merged commit 4926c0f into flutter:main Sep 24, 2024
76 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 24, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Sep 24, 2024
flutter/packages@9de72be...4926c0f

2024-09-24 43054281+camsim99@users.noreply.github.com [quick_actions] Add guidance for correcting task management/back press behavior for apps with launcher activities (flutter/packages#7686)
2024-09-24 stuartmorgan@google.com [various] Adds macOS privacy manifests (flutter/packages#7687)
2024-09-23 109111084+yaakovschectman@users.noreply.github.com [google_maps_flutter_android] Convert `PlatformPolyline.pattern` to Pigeon (flutter/packages#7631)
2024-09-23 engine-flutter-autoroll@skia.org Roll Flutter from 2f149da to 4ca51a1 (5 revisions) (flutter/packages#7685)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 26, 2024
flutter/packages@9de72be...4926c0f

2024-09-24 43054281+camsim99@users.noreply.github.com [quick_actions] Add guidance for correcting task management/back press behavior for apps with launcher activities (flutter/packages#7686)
2024-09-24 stuartmorgan@google.com [various] Adds macOS privacy manifests (flutter/packages#7687)
2024-09-23 109111084+yaakovschectman@users.noreply.github.com [google_maps_flutter_android] Convert `PlatformPolyline.pattern` to Pigeon (flutter/packages#7631)
2024-09-23 engine-flutter-autoroll@skia.org Roll Flutter from 2f149da to 4ca51a1 (5 revisions) (flutter/packages#7685)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 26, 2024
flutter/packages@9de72be...4926c0f

2024-09-24 43054281+camsim99@users.noreply.github.com [quick_actions] Add guidance for correcting task management/back press behavior for apps with launcher activities (flutter/packages#7686)
2024-09-24 stuartmorgan@google.com [various] Adds macOS privacy manifests (flutter/packages#7687)
2024-09-23 109111084+yaakovschectman@users.noreply.github.com [google_maps_flutter_android] Convert `PlatformPolyline.pattern` to Pigeon (flutter/packages#7631)
2024-09-23 engine-flutter-autoroll@skia.org Roll Flutter from 2f149da to 4ca51a1 (5 revisions) (flutter/packages#7685)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 27, 2024
flutter/packages@9de72be...4926c0f

2024-09-24 43054281+camsim99@users.noreply.github.com [quick_actions] Add guidance for correcting task management/back press behavior for apps with launcher activities (flutter/packages#7686)
2024-09-24 stuartmorgan@google.com [various] Adds macOS privacy manifests (flutter/packages#7687)
2024-09-23 109111084+yaakovschectman@users.noreply.github.com [google_maps_flutter_android] Convert `PlatformPolyline.pattern` to Pigeon (flutter/packages#7631)
2024-09-23 engine-flutter-autoroll@skia.org Roll Flutter from 2f149da to 4ca51a1 (5 revisions) (flutter/packages#7685)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 27, 2024
flutter/packages@9de72be...4926c0f

2024-09-24 43054281+camsim99@users.noreply.github.com [quick_actions] Add guidance for correcting task management/back press behavior for apps with launcher activities (flutter/packages#7686)
2024-09-24 stuartmorgan@google.com [various] Adds macOS privacy manifests (flutter/packages#7687)
2024-09-23 109111084+yaakovschectman@users.noreply.github.com [google_maps_flutter_android] Convert `PlatformPolyline.pattern` to Pigeon (flutter/packages#7631)
2024-09-23 engine-flutter-autoroll@skia.org Roll Flutter from 2f149da to 4ca51a1 (5 revisions) (flutter/packages#7685)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
auto-submit bot pushed a commit that referenced this pull request Oct 2, 2024
…vity with more breadcrumbs (#7716)

Builds on #7686 to give more context about the issue I solved in flutter/flutter#152883 and hopefully leave better breadcrumbs for developers that find themselves wanting to use a launcher activity and the `quick_actions_android` plugin.

Fixes flutter/flutter#152883.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: quick_actions platform-android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[quick_action][android] Not working with "LauncherActivity"
2 participants