Android Tutorials
Native Android from an empty Gradle project to an app on the Play Store — Kotlin and Jetpack Compose first, then everything a tutorial usually skips: ViewModels and process death, layer boundaries that keep a codebase readable, coroutines and Flow, Hilt, the Keystore, what the OS does to your app in the background, and how to test any of it. Every example is lifted from a working pizza ordering app, so code in these posts is code that runs.
- Android – Interview QuestionsThe questions an Android role actually asks, answered against the lessons before this one. Activity versus ViewModel lifetimes, process death, recomposition and stability, StateFlow versus LiveData, structured concurrency, Hilt scopes, and how you would make a screen testable. Short answers, with the reasoning.
- Android – Building and ShippingBuild types and BuildConfig, R8 and why the release build is the only one that can crash on a missing keep rule, signing with an upload key that never touches Git, App Bundles, a CI workflow, and what Play Console review actually asks of you.
- Android – Previews, Lint and ToolingCompose previews that render without a backend, and the screen/content split that makes them possible. Android Lint as a build gate, .editorconfig and ktlint, Gradle properties that matter, and what to reach for when the app is slow.
- Android – TestingWhat is worth testing in an Android app and where each test runs. Pure JVM tests for the rules, MockWebServer for the network, virtual time for debounces and polling, ViewModels with a test Main dispatcher, Robolectric when Android is genuinely needed, and Compose UI tests through the semantics tree.
- Android – Accessibility in ComposeThe semantics tree is what TalkBack reads, and it is what your UI tests read too. contentDescription, mergeDescendants and the trap in it, roles and state descriptions, one adjustable control instead of three nodes, live regions, headings, and 48dp touch targets.
- Android – Payments with Stripe PaymentSheetCreate the order, then pay — and why the device is never the authority on price. Stripe's PaymentSheet in Compose, why a ViewModel cannot hold it, events as state, saving a card with a SetupIntent, and asking the server whether the payment really settled.
- Android – The App LifecycleWhat Android does to your app when it leaves the screen, and the two problems the web never has: saving work before the process is killed, and not knowing who is signed in for the first few milliseconds. ProcessLifecycleOwner, the splash screen API, and a launch sequence whose order is load-bearing.
- Android – DataStore and the KeystoreWhere each thing an app remembers belongs. DataStore and why it replaced SharedPreferences, encrypting a token with an Android Keystore key that never leaves the device, why EncryptedSharedPreferences is no longer the answer, and backup rules that keep secrets off other phones.
- Android – Dependency Injection with HiltWhat Hilt actually generates, @Inject constructors, modules with @Provides and @Binds, components and scopes as lifetimes, qualifiers, @HiltViewModel, and swapping the network for fakes in a test — set against the hand-written composition root the iOS version of this app uses instead.
- Android – App ArchitectureLayers with dependencies pointing inwards: repository interfaces in the domain, Retrofit in the data layer, a pure reducer for the rules and a store for the effects, and unidirectional data flow from StateFlow to screen and back. With the parts of Google's guide this app follows and the parts it skips.
- Android – Coroutines and FlowStructured concurrency on Android: viewModelScope, an application scope for work that must outlive a screen, async for parallel requests, cancellation as a debounce, a polling loop that stops itself, Mutex instead of synchronized, and StateFlow with stateIn and collectAsStateWithLifecycle.
- Android – Error Handling That Users Can Act OnOne sealed ApiError whose cases are decisions, one place that maps every library exception onto it, the CancellationException you must never swallow, UiState instead of three booleans, and ActionOutcome for writes — including the cancelled case that a Result has nowhere to put.
- Android – Networking with Retrofit and OkHttpRetrofit interfaces as the API surface, OkHttp interceptors for the token, kotlinx.serialization and the three settings that bite, the base URL from build configuration rather than code, and why plain HTTP to your dev machine fails until you write a network security config.
- Android – Building a Design System with Material 3Tokens, a semantic layer and components — and where Material 3's ColorScheme fits in that, where it runs out, and how a CompositionLocal fills the gap. The window theme versus the Compose theme, dynamic colour and why this app turns it off, and a button that prevents the double-submitted order.
- Android – Bottom Sheets and DialogsIn Compose a sheet is shown by being composed and dismissed by leaving composition. ModalBottomSheet and its state, skipPartiallyExpanded, AlertDialog for destructive actions, resetting a form for free with keyed state, and the one nullable enum that makes two sheets at once impossible.
- Android – Forms, Text Input and ValidationThe keyboard is part of your UI. KeyboardOptions and IME actions, moving focus between fields, input filtering, imePadding so the button is not hidden, error semantics for TalkBack, and a validation model that keeps the rules out of the composable and testable on the JVM.
- Android – Lazy Lists and Keeping Them FastLazyColumn versus a Column in a scroll, keys and why a missing one is a state bug, contentType, pull-to-refresh, and how Compose decides what to skip — stability, @Stable and @Immutable, lambdas, and the few things you still have to do yourself.
- Android – Navigation ComposeType-safe routes as @Serializable classes instead of strings that crash at runtime. A NavHost with a nested graph per tab, a bottom bar that remembers each tab's history, arguments read back through SavedStateHandle, and replacing checkout with the receipt so Back cannot return to a paid order.
- Android – ViewModels, Rotation and Process DeathThe Android-only lesson. What a ViewModel survives and what it does not, why rotating the phone destroys your Activity, and the case most apps get wrong: the OS killing your process in the background and recreating the screen as if nothing happened. SavedStateHandle, rememberSaveable, and what deserves to be saved.
- Android – State and Recompositionremember, rememberSaveable, state hoisting and StateFlow: which one to reach for, and the rule that decides it. What recomposition is and what triggers it, derivedStateOf, stateless components, and the line between state a screen owns and state the whole app owns.
- Android – Jetpack Compose and LayoutA composable is a function that describes UI, and almost everything surprising about Compose follows from that. Column, Row and Box, weight and alignment, why modifier order IS the layout, and how to build the reusable card every screen in this app is made of.
- Android – The Kotlin You Need FirstNot the whole language — the parts an Android app leans on every day. Null safety, val and immutable data classes, sealed types and exhaustive when, extension functions, lambdas and the scope functions, and exceptions as the error model. With the models of a real ordering app as the running example.
- Android – Getting StartedWhat you actually need to build an Android app, what Gradle is doing on your behalf, and the anatomy of a project — settings, the version catalog, the app module, the manifest, one Activity. Ending with the app running on an emulator against a real backend, and why the emulator calls your Mac 10.0.2.2.