[Bug] Android frames are missing from frame stack after backpress and app resume
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 66/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- android, typescript
- Domaine
- mobile-dev
Piste de recherche
Commencez par les implémentations de Frame.topmost() et Frame.getFrameById(), puis suivez la gestion de Android backpress décrite dans l’issue. Reproduisez la séquence sur Android 12 ou une version ultérieure avec plusieurs frames et un frame identifié ; le travail est terminé lorsque le frame reste détectable après backpress et la reprise de l’application.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Issue Description
In android 12 and later, root launcher activities are no longer finished on Back press.
See https://developer.android.com/about/versions/12/behavior-changes-all#activity-lifecycle
However, {N} core overrides backpress and removes frames from stack, thinking that the activity will finish.
Then, user attempts to launch the app and it will simply resume without recreating views and frames will still be missing from the stack.
That is because the frame stack implementation is very old and did not consider the more recent android 12 behaviour.
The issue affects Frame.topmost() and Frame.getFrameById().
This can be replicated in apps with multiple frame instances as back press makes sure core keeps at least a single frame in the stack.
Reproduction
- Launch an app with a frame that has an
idin android 12 or later - Log result from
Frame.getFrameById(id)which should print the frame view - Press back to close application
- Launch app again and it will still be in the last navigated page
- Log result from
Frame.getFrameById(id)and it will be undefined
Relevant log output (if applicable)
Environment
No response
Please accept these terms
- I have searched the existing issues as well as StackOverflow and this has not been posted before
- This is a bug report
- I agree to follow this project's Code of Conduct
- Langage dominant
- TypeScript
- Étoiles
- 25.7k
- Forks
- 1.7k
- Merge moyen
- 1 j 5 h
- PR mergées (30 j)
- 35
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de NativeScript/NativeScript
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
NativeScript/NativeScript#11068 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
NativeScript/NativeScript#11421 ·
-
bug-pending-triage
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
NativeScript/NativeScript#11415 ·
-
bug-pending-triage
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
NativeScript/NativeScript#11374 ·
-
bug-pending-triage
Difficulté 4/5 3-5 jours Accessibilité débutants 42/100
NativeScript/NativeScript#11265 · 1 commentaire ·
Toutes les issues de NativeScript/NativeScript
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
area:tools bug good first issue help wanted priority:P2
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
newrelic-experimental/preflight#793 · 1 commentaire ·
-
bug 🐞
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
BasedHardware/omi#15320 ·