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

Custom ViewGroup for advanced layouts

Custom ViewGroups enable specialized layout behavior beyond standard containers. I extend ViewGroup and override onMeasure() to measure children and onLayout() to position them. measureChild() or measureChildWithMargins() determines child sizes. Layou

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

Biometric authentication implementation

BiometricPrompt provides secure authentication via fingerprint, face, or iris. I create BiometricPrompt with callback handling success, error, and failure. PromptInfo configures title, subtitle, description, and allowed authenticators. Negative button

CameraX for camera functionality

CameraX simplifies camera implementation with consistent behavior across devices. I bind use cases—Preview, ImageCapture, ImageAnalysis, VideoCapture—to lifecycle. ProcessCameraProvider manages camera instances. Preview displays viewfinder, ImageCaptu

ExoPlayer for media playback

ExoPlayer is a flexible media player supporting diverse formats and protocols. I create instances with ExoPlayer.Builder(context).build() and configure with MediaItem. Setting player.setMediaItem() and player.prepare() initializes playback. PlayerView

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

Glide for image loading and caching

Glide efficiently loads and caches images from network, disk, or resources. I use Glide.with(context).load(url).into(imageView) for basic loading. Transformations apply effects—centerCrop(), circleCrop(), RoundedCorners(). Placeholders show during loa

Firebase Cloud Messaging for push notifications

Firebase Cloud Messaging (FCM) delivers push notifications across platforms. I extend FirebaseMessagingService and override onMessageReceived() to handle incoming messages. Device tokens obtained via FirebaseMessaging.getInstance().token register with

Unit testing with JUnit and MockK

Unit testing verifies individual components in isolation. I use JUnit 5 or JUnit 4 as the test framework with @Test annotations. MockK provides Kotlin-friendly mocking—mockk<T>() creates mocks, every { } stubs behavior, verify { } confirms calls

Encrypted SharedPreferences for secure storage

EncryptedSharedPreferences secures simple key-value data using Android Keystore. I create instances with EncryptedSharedPreferences.create() specifying encryption schemes. The master key uses MasterKeys or MasterKey.Builder for automatic key generatio

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