Moving from Web to Android Development: What I Learned
Before getting serious about Android development, I’d spent a good while working in web. Moving from a web mindset to mobile required some adjustments I didn’t expect.
Lifecycle is real and it matters. On the web, a “page” usually has a simple life — load, then unload. On Android, Activities and Fragments have a much more complex lifecycle (onCreate, onStart, onResume, onPause, and so on), and forgetting to handle one of those states can crash the app or leak memory.
Resource constraints are real. On the web, you don’t usually think much about the user’s memory or battery. On mobile, every background task, every wake lock, has a direct cost to the user’s battery life — and they’ll uninstall your app if it’s wasteful.
Async is the default, not optional. Network calls, disk I/O, all of it needs to be async so it doesn’t block the main thread and freeze the UI. Kotlin Coroutines makes this far more manageable than callback hell.
Testing is more of a hassle. There’s no “refresh the browser” to see a change. The build-deploy-test cycle on Android is much slower than hot-reload on the web (though it keeps improving with modern tooling).
What I’m most grateful for from this experience: the “resource-aware” mindset from mobile development ended up making my web code more efficient too.