[Request]: Specify Intent.FLAG_ACTIVITY_NEW_TASK for sharing

未关闭
#2,267 2 条评论 7 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
android, dart, flutter
领域
mobile-dev

调研方向

首先定位 share_plus 中创建分享 intent 的 Android 实现,然后检查发起分享的 activity 如何启动 Android 分享表单。确定该 flag 应始终应用,还是应作为选项提供,并根据报告中的分享流程验证由此产生的应用切换器行为。

由索引模型根据 Issue 内容生成。

描述

enhancement triage
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

主要语言
Dart
星标
1.9k
派生
1.3k
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

fluttercommunity/plus_plugins 的其他 Issue

查看 fluttercommunity/plus_plugins 的全部 Issue

相似的 Issue

更多 Dart Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。