airbnb / airbnb/native-navigation
Is this able to recover when activity is destroyed?
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 173
- PR merge metrics
- No merged PRs in 30d
Description
When talking about natively build navigators for React Native the main problem with them have been compatibility with Android when activity is destroyed. When I turn "Don't keep activities" to ON on Android and put my app on background the activity is destroyed right away. With this setting on and using wix's react-native-navigation it does not remember the route I was in. This will be major drawback for apps that are required to be used on background too.
The main benefit with the JS based routing is that you can put routes to redux store which is not destroyed on activity destroy and all my routes are on memory even when activity is destroyed.
So I would recommend you guys to keep "Don't keep activities" to ON mode all the time when developing this navigator. And maybe it will become defacto navigation library of RN! :)
Contributor guide
Research direction
Reproduce the issue on Android with "Don't keep activities" enabled, then inspect the native navigation activity lifecycle and how the current route is retained across destruction. Done means returning to the app restores the route that was active before the activity was destroyed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100