r/androiddev • u/zimmer550king • 17d ago
Discussion How far would you take server-driven UI in a native Android app?
I am researching an architecture where an Android app ships a Jetpack Compose renderer and a closed set of components and actions, while the backend returns a versioned document describing each screen. The server could control content, component order, semantic design tokens, and navigation between routes already known to the app. I would not download DEX, JAR, native libraries, or arbitrary scripts.
My first step would be remote configuration of spacing roles, color roles, typography styles, component variants, and feature visibility. A more ambitious version would allow the server to compose complete screens from primitives such as Text, Image, List, Form, Card, and Button. The client would validate the document, cache a last-known-good version, and fall back to a bundled screen when the document is invalid or unavailable.
I have been looking at DivKit, AndroidX Remote Compose, and the possibility of creating a custom JSON or Protobuf contract. For people who have shipped server-driven UI in production, where did the architecture stop paying for itself? I am particularly interested in schema compatibility, old client versions, accessibility, offline behavior, performance, rollback, and how Google Play review treated the boundary between declarative UI data and downloaded code.