#kotlin
12 posts tagged kotlin. 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.
Abstract classes vs interfaces in KotlinHow abstract classes and interfaces work in Kotlin, when to use each, and how open, override and super fit together.
Kotlin OOP basics: classes, properties, constructors, inheritance and polymorphismKotlin classes and objects, companion objects, properties and backing fields, primary and secondary constructors, inheritance with open, and polymorphism.
Reflection and annotations in Kotlin: reading properties and custom annotationsHow to inspect a class at runtime with Java reflection and kotlin-reflect, and how to declare, apply and read your own annotations in Kotlin.
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.
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.
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.
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.
Parsing JSON with Klaxon in Kotlin: data classes, arrays and the json DSLUse the Klaxon library to parse JSON into Kotlin data classes, parse JSON arrays into lists, and build JSON with Klaxon's json DSL.
RxKotlin basics: creating, transforming and combining ObservablesSet up RxKotlin 3 with RxJava 3, create Observables, use map, filter, merge and zip, handle errors, and move work between threads with schedulers.
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)