DoorDash Aug 4, 2020

Implementing the Android Navigation Library

Article Summary

Maria Sharkina from DoorDash discovered that Android's Navigation Library has a critical flaw: it forces navigation before your app is ready. Here's how her team solved it without breaking deep links or the back button.

When rewriting the DoorDash Android Consumer app, the team hit a wall with Android Jetpack's Navigation Library. The framework's recommended approach for conditional navigation created three major problems: unauthorized users briefly saw screens they shouldn't access, authentication logic spread across multiple destinations, and the app couldn't wait for critical dependencies to initialize before navigating.

Key Takeaways

Critical Insight

DoorDash solved ANL's premature navigation by moving the start flow to a separate task, ensuring dependencies initialize and users authenticate before the Navigation Library takes over.

The article includes actual code snippets showing exactly how to implement this workaround while preserving deep link functionality.

Recent from DoorDash

Related Articles