Modernising a Legacy Android App Architecture: Part Three - Applying the Refactor
Article Summary
Rob Pridham from BBC Sport reveals how his team tackled a massive Android refactor—migrating from multiple activities to a single-activity architecture while keeping the app running in production.
This is the final installment of a three-part series documenting BBC Sport's Android app modernization. The team applied MVVM+C architecture across their legacy codebase while consolidating dozens of activities into a unified fragment hierarchy. The work spanned August to December 2020 alongside ongoing feature development.
Key Takeaways
- Fragment replace vs add strategy: memory concerns killed the add approach
- WebView state restoration proved trickiest: scroll position fights required creative workarounds
- Shared ViewModels across fragments enabled complex multi screen onboarding flows
- Navigation responsibility cleanup required UX changes to rationalize ambiguous parent contexts
- Feature flagged development allowed parallel work until migration reached critical mass
Critical Insight
BBC Sport successfully refactored their legacy Android app to single-activity MVVM+C architecture, unlocking faster feature development despite significant WebView and navigation challenges.