Older Android codebases, with Java, XML layouts, and tangled architecture, are good candidates for gradual modernization. Agents can handle much of the mechanical work if the process is controlled.
Start by understanding
Ask the agent to map the code: modules, major screens, dependencies, and areas with no tests. A summary of what exists is useful even before any change is made.
Add tests first
Before changing behavior-sensitive code, add characterization tests that capture what it currently does. They give you a safety net to detect accidental changes.
Migrate in small steps
Good migration units include converting a Java class to Kotlin, replacing an XML screen with a Compose equivalent, or moving a feature into its own module. Each step should be reviewable and independently verifiable.
Run old and new side by side
Where possible, keep the old implementation working while the new one is introduced, and switch over once it is verified. That reduces the risk of a big-bang rewrite.
Be careful with subtle behavior
Automated conversion can change null handling, threading, and lifecycle behavior. Review those areas closely.
Track progress
Maintain a checklist of what has been migrated, so work can resume cleanly across sessions.
Takeaway
Treat modernization as many small, tested steps, with the agent doing the repetitive edits and people making the design decisions.
Continue with the book
Explore the full treatment, worked examples, and exercises in Agentic Android App Development.
Adapted from Agentic Android App Development, published by Choral Software. Article text and original examples © 2026 Choral Software. All rights reserved.
