Implement a Routing Strategy
Right now, the app does not have a good way of routing between activities and maintaining more than one fragment on a view on a large tablet.
Here are are some overarching issues:
- Routing between activities still uses the old-style implicit intents, requiring each activity to implement a deep link
- Back stack navigation is strange, especially when exiting the app and coming back in
- The state of the fragments is not reflected in redux, making it impossible to recreate if the activity loses a sense of which fragments it should show. This problem is most clearly apparent when rotating a device that causes the application to jump between different device types (e.g., landscape == large tablet, portrait == small tablet)
- How is the back stack to be managed when jumping across tabs (i.e., different activities in different modules)?
Here is what needs to be accomplished:
- Establish a fragment routing strategy which works across phones and all tablet types
- Ensure routing works as expected when rotating a device causes the application to jump between different device types (e.g., large tablet -> small tablet)
- Use real dynamic feature module loading and routing when navigating between activities across different modules
- Override the OS-managed back stack and implement one which is managed on a per-activity basis. This management technique should be able to work on both tablet (master, detail layouts) and phone (single view layouts). Since the application's feature modules are organized per tab on the UI, then this back stack should manage one back stack per tab. Therefore, if the back stack in tab B is empty, pressing back should close the app, even if the user was previously looking at tab A. Click on tab A would activate the back stack for that tab and behave the same way.
- Implement this strategy to all existing routes, including the route which logs the user in from Auth0