techrankers

techrankers

Best architecture for a production Android app in 2026?

I’m working on a production Android application and I’m trying to settle on an architecture that will remain maintainable as the project grows.

For a new Android project in 2026, would you recommend a fairly standard approach such as:

  • Kotlin
  • Jetpack Compose
  • MVVM
  • ViewModel
  • Repository pattern
  • Coroutines / Flow
  • Room for local data
  • Retrofit or another API client
  • Hilt for dependency injection

Or are there situations where you’d use a different architecture, particularly for larger applications with multiple modules and a fairly complex backend?

I’m especially interested in how people are handling:

  1. Modularization
  2. Offline-first functionality
  3. State management with Compose
  4. API and repository layers
  5. Testing ViewModels and business logic
  6. Keeping the codebase manageable as the number of features increases

For those who have maintained production Android applications for a few years, what architectural decisions turned out to be worthwhile, and what would you avoid if starting the project again?

First Post!

premsinghsodha7

premsinghsodha7

Your stack is a reasonable starting point. I would make the data flow and dependency boundaries explicit before adding more layers.

For the areas you listed:

  • Compose state: expose an immutable screen state from the ViewModel, usually through StateFlow. Collect it with collectAsStateWithLifecycle(), and send user actions back through ViewModel methods. Keep state such as an expanded menu local to the composable when no business logic needs it.
  • Offline-first: have the UI read from a local source through the repository. A refresh fetches remote data and updates the local database, which then emits the new state. Decide separately how queued writes, retries, and conflicts work; caching reads alone does not solve those problems.
  • Repositories: organize them around data responsibilities rather than creating one per endpoint. Keep Retrofit and Room details behind that boundary. Add use cases when they simplify reused or complex business logic.
  • Modules: split around cohesive features and genuinely shared capabilities. A larger backend does not automatically require more Android modules. Consider ownership, dependency direction, and build impact when deciding where a boundary helps.
  • Tests: test ViewModels with fake repositories and controlled coroutine dispatchers. Check loading, success, failure, and retry behavior. Test database queries and migrations separately; reserve UI tests for important user journeys.

A useful first slice is one screen that loads cached data, refreshes it, handles a network failure, and is covered by tests. That gives you evidence about the architecture before you repeat it across every feature.

Google’s architecture recommendations and offline-first guide cover these boundaries and trade-offs.

Where Next?

Popular Android topics Top

AndroidMan
I’ve tried signing up for Airnow as I used to do very well when they were Airpush, but i haven’t used them in years. I went through the s...
New
Aathithyan
I need to know how to implement outgoing call in my custom application instead of using default phone call app i need my own app call.
New
Tuk-tuk
Hello! I’m learning Android Jetpack compose development from tutorials and documentation by Android developers. And I ran into a problem…...
New
cve60069
Hello I am starting the tearning curve to writing an app for my galaxy phone. Me and my friens play a lot of “Texas Hold-Em” and, for t...
New
sonit
Display is not working properly in landscape mode when projection given by pixel 7 version 13 in case of video play by youtube app after ...
New
Garrett
I’m stuck trying to understand how to get a variable initialised, and later updated, in kotlin to update in Jetpack Compose and cause a c...
New
auroralane7754
Hey developers :waving_hand: I’m currently experimenting with various mobile VPN apps to simulate different network conditions for API t...
New
xolatgames
Hi folks! :victory_hand: How are you? :slightly_smiling_face: I’m newcommer here. Without useless words I want to ask you the question. ...
New
deveshpatel-TW
I’m currently experimenting with Android Studio for a project that consists of multiple independent Android Library modules that internal...
New
bee
Hi, I’d like a class that I can access from all activities / views, which is initialised once and not need to pass the reference. I gues...
New

Other popular topics Top

AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
mafinar
This is going to be a long an frequently posted thread. While talking to a friend of mine who has taken data structure and algorithm cou...
New
PragmaticBookshelf
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
PragmaticBookshelf
Programming Ruby is the most complete book on Ruby, covering both the language itself and the standard library as well as commonly used t...
New
First poster: bot
zig/http.zig at 7cf2cbb33ef34c1d211135f56d30fe23b6cacd42 · ziglang/zig. General-purpose programming language and toolchain for maintaini...
New
PragmaticBookshelf
Explore the power of Ash Framework by modeling and building the domain for a real-world web application. Rebecca Le @sevenseacat and ...
New
AstonJ
This is cool! DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON We just witnessed something incredible: the largest open-s...
New
PragmaticBookshelf
Quickly turn complex problems into simple, working solutions using functional programming, safe concurrency, and the expressive tools of ...
New
CommunityNews
Open-source implementation of the classic GTA engine now running directly in your browser. Experience the reVC technology demo on DOS.Zon...
New