#android
22 posts tagged android. All posts
Android Room basics: entities, DAOs and a database in KotlinHow to set up Android's Room library with KSP, define an entity, DAO and database, and read and write data from an Activity with coroutines and Flow.
ButterKnife on Android: binding views and click listeners, and migrating to View BindingHow ButterKnife's @BindView and @OnClick annotations work, the setup gotchas on current Android Gradle Plugin versions, and the View Binding code that replaces them.
Adding a Google Map with a marker to an Android appSet up a Maps SDK for Android API key, add the play-services-maps dependency, and show a map with a marker using SupportMapFragment in Java.
Espresso UI tests on Android: setup, matchers, idling resources and intentsHow to set up Espresso with AndroidX Test, write a UI test with ActivityScenarioRule, handle background work with idling resources, and verify intents.
ExoPlayer on Android: playing video and DASH streams with Media3How ExoPlayer is structured and how to play a video or DASH stream with it in an Android app, using the current AndroidX Media3 artifacts.
RxJava 3 on Android: observables, operators and threadingHow RxJava 3 models async work on Android: Observable, Single and friends, common operators, schedulers, Retrofit integration, and disposing subscriptions.
Google Analytics on Android: the legacy v4 SDK and moving to FirebaseWhat Google Analytics v4 SDK code for Android looks like, why it no longer works, and how to replace trackers and hits with Google Analytics for Firebase.
Mockito for Android unit tests: mocks, stubbing, and verificationUse Mockito 5 in Android unit tests: create mocks, stub return values, verify calls, use argument matchers and answers, and mock final classes.
Retrofit on Android: calling a REST API from JavaSet up Retrofit in an Android app, define an API interface, make an async call with enqueue, and share one OkHttpClient for caching, auth headers and pooling.
Dagger 2 on Android: components, modules, scopes and a working setupHow Dagger's components, modules, @Inject constructors and scopes fit together, with a working Java example for an Android app and when to use Hilt instead.
Firebase Realtime Database on Android: setup, reads, writes and security rulesAdd Firebase Realtime Database to an Android app with the Firebase BoM, write and listen for data in Java, enable offline persistence, and lock it down with rules.
Places SDK for Android: nearby search, place details, autocomplete, and photosSet up the Places SDK for Android with Places API (New), then run a nearby search, fetch place details, show autocomplete predictions, and load place photos in Java.
The Android Support Library: what it did and how to move to AndroidXWhat the Android Support Library provided, how its artifacts map to AndroidX and Material Components, and how to migrate an old project off android.support.
Jetpack Navigation for fragments: nav graphs, Safe Args, and deep linksSet up the Jetpack Navigation component in a fragment-based Android app: a navigation graph, a NavHostFragment, type-safe arguments with Safe Args, and deep links.
Loading images on Android with Glide: setup, placeholders, transformations and cachingHow to add Glide to an Android project, load images into an ImageView with placeholders, apply built-in and custom transformations, and control caching.
The Android framework APIs: core packages and app componentsA map of the Android framework's core android.* packages and the four app components (activities, services, content providers, broadcast receivers), with current caveats.
Picasso on Android: loading, resizing, and transforming imagesLoad images into Android ImageViews with Square's Picasso: placeholders, resizing, and custom transformations, plus the Coil equivalent now that Picasso is deprecated.
OkHttp on Android: making requests and adding interceptorsAdd OkHttp 5 to an Android app, make an asynchronous GET request without leaking responses, and write an interceptor for logging or auth headers.
Android Architecture Components: ViewModel, LiveData, Room, WorkManager and Navigation in KotlinA short Kotlin example for each of the main Jetpack architecture libraries (ViewModel, LiveData, Room, Data Binding, WorkManager, Navigation) and the gotchas in each.
Material Components for Android: themes and common widgets in XML layoutsSet up Material Components for Android (Views) with a Material 3 theme, then use buttons, text fields, cards, app bars, navigation views, and snackbars.
KAndroid Kotlin extensions for Android, and what replaces them todayWhat the KAndroid library offers (text watchers, toasts, intents, threading and logging helpers), how to add it with JitPack, and the AndroidX equivalents.
Anko for Android: Kotlin layout DSL, intents and dialogs (deprecated)How JetBrains' Anko built Android layouts, intents and dialogs in Kotlin code, why it's deprecated, and the Jetpack Compose equivalent.
© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)