kotlin

Kotlin coroutines for async operations

Kotlin coroutines provide structured concurrency for asynchronous programming. I use suspend functions to mark async code, and launch or async to start coroutines. viewModelScope and lifecycleScope tie coroutines to component lifecycles, cancelling au

Download Manager for file downloads

DownloadManager handles long-running downloads with notification progress. I create DownloadManager.Request with URI and destination. setNotificationVisibility() controls progress notifications. Headers customize HTTP requests. Network type requiremen

Material Design 3 theming

Material Design 3 (Material You) brings dynamic theming to Android. I define color schemes with primary, secondary, tertiary colors and their variants. MaterialTheme composable wraps the app with colorScheme, typography, and shapes. Dynamic colors use

DataStore for modern preferences

DataStore replaces SharedPreferences with coroutine and Flow support. Preferences DataStore stores key-value pairs with type safety using preferencesDataStore delegate. Proto DataStore stores typed objects using Protocol Buffers. I use dataStore.data

Room database for local persistence

Room provides an abstraction layer over SQLite for compile-time verified database access. I define entities with @Entity annotation, specifying table structure and relationships. DAOs (Data Access Objects) marked with @Dao contain query methods using

ProGuard and R8 code optimization

ProGuard and R8 shrink, obfuscate, and optimize Android apps for release builds. R8 is the default tool, combining shrinking and desugaring. I configure rules in proguard-rules.pro—keeping classes used by reflection, serialization, or native code. -ke