jetpack

LiveData transformations and mediators

LiveData transformations create derived data streams reactively. Transformations.map() converts values—like mapping User to username string. Transformations.switchMap() switches LiveData sources based on input, enabling dynamic queries. MediatorLiveDa

Navigation Component for app navigation

Navigation Component provides consistent navigation with type-safe argument passing. I define navigation graph in XML with destinations and actions. NavController handles navigation with navigate() and popBackStack(). Safe Args plugin generates type-s

Paging 3 library for data pagination

Paging 3 loads large datasets incrementally with network and database support. I create a PagingSource implementing load() method to fetch pages. RemoteMediator orchestrates network and database, fetching from API and caching locally. Pager configurat

WorkManager for background tasks

WorkManager schedules deferrable, guaranteed background work. I create Worker or CoroutineWorker subclasses with doWork() method. Constraints specify when work runs—network type, charging status, battery level. One-time requests use OneTimeWorkRequest

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