fluttercommunity / fluttercommunity/plus_plugins

[Request]: Specify Intent.FLAG_ACTIVITY_NEW_TASK for sharing

Aperta
#2,267 2 commenti 7 reazioni 0 assegnatari Vedi su GitHub
enhancement triage
Lingua principale
Dart
Stelle
1.9k
Fork
1.3k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia individuando l’implementazione Android in share_plus in cui viene creato l’intent di condivisione, quindi esamina come l’activity di origine avvia il foglio di condivisione Android. Determina se il flag debba essere sempre applicato o esposto come opzione e verifica il comportamento risultante del selettore delle app rispetto al flusso di condivisione segnalato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
android, dart, flutter
Ambito
mobile-dev
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.