fluttercommunity / fluttercommunity/plus_plugins

[Request]: Specify Intent.FLAG_ACTIVITY_NEW_TASK for sharing

Open
#2,267 2 comments 7 reactions 0 assignees View on GitHub
enhancement triage
Dominant language
Dart
Stars
1.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

### Plugin

share_plus

### Use case

I am experiencing a behavior where sharing via the Android share sheet causes the target app to be displayed it the same app switcher entry as the originating app. From my research, this is because the sharing intent is not created with the `Intent.FLAG_ACTIVITY_NEW_TASK` flag. If we could optionally (or always) pass this flag when sharing, I believe that would make the flow much more intuitive for users.

### Proposal

Have an option to (or just always) set `Intent.FLAG_ACTIVITY_NEW_TASK` when creating the share intent on Android.

### Expected behavior

This is sharing from Keep to Drive, and it works as expected.

https://github.com/fluttercommunity/plus_plugins/assets/7417301/3fc7a343-7d9e-4de5-a52b-863ec66a7a07

### Current behavior

This is sharing from Thunder (which uses `share_plus`) to Drive, and it does not work as expected.

https://github.com/fluttercommunity/plus_plugins/assets/7417301/0ec0877f-ba8b-47ac-a2b9-b351f1ccb1ec

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.