Kotlin Articles

Android gRPC End to End: Protobuf Code Generation to Bidirectional Streaming for Client-Cloud Collaboration

Starting from a real client-cloud voice assistant, this post walks through gRPC on Android: Protobuf contract generation, bidirectional streaming, and practical concerns such as threading, backpressure, and reconnection.

Android MQTT Communication End to End: From Paho QoS Semantics to Doze-Mode Keepalive Engineering

From MQTT QoS semantics and Paho acknowledgment retransmission to Doze-mode long-connection keepalive, a complete reliability chain and engineering practice for Android IoT communication.

Inside Retrofit: Dynamic Proxies and Coroutine Call Adapters

Break down Retrofit network layer end to end: from JDK dynamic proxy intercepting interface methods, to annotation parsing generating request templates, to OkHttp lazy-execution bridging and CallAdapter coroutine adaptation, revealing the plugin-based design behind declarative HTTP architecture.

Ktor Client End-to-End: From Engine Abstraction to a Coroutine-Powered Network Layer in Kotlin Multiplatform

This article walks through Ktor Client end to end, examining its engine abstraction, interceptor pipelines, and coroutine-based network layer, and covers practical topics like engine selection, timeout semantics, and MockEngine testing.

Deep Dive into Android's Haptic Feedback System: From VibrationEffect Waveform Synthesis to Vibrator HAL Haptic Design Engineering Practice

From VibrationEffect waveform synthesis and VibratorManager scheduling to HAL drivers, dissect Android's haptic feedback chain and summarize haptic design engineering practices under power-save mode.

Adaptive Performance Scheduling with Android ADPF: From Thermal API to Performance Hints

How Android's Dynamic Performance Framework connects Thermal API, Performance Hints, and Game Mode to shed load before thermal throttling and flatten the frame-drop curve.

Inside Android SQLite: Connection Pool Reuse, WAL Logging, and Transaction Isolation

A "database is locked" investigation leads into connection pool reuse, WAL logging, and transaction isolation internals, with a practical checklist for concurrent read/write scenarios.

Kotlin Lambdas, Function References, and Compose: Verify Before Caching

(Updated on )
Separate Kotlin callback semantics, JVM lowering, and Compose memoization; check Strong Skipping and prevent stale captured handlers before adding remember.

Kotlin Sequence vs. Iterable: Lazy Collection Performance

How Kotlin Sequences avoid intermediate allocations through lazy evaluation, the Iterator protocol and yield, with benchmark data and practical selection guidance.

Systematic Fault-Tolerant UI States in Android

A systematic approach to modeling loading, content, empty, and error states in Android apps.

Kotlin Error Handling: try-catch, Result, and Arrow Either

A practical comparison of try-catch, Kotlin Result, and Arrow Either for structuring error handling in Android apps.

Kotlin Coroutine Cancellation: Cooperative Shutdown Done Safely

Understand cancellation propagation, structured concurrency, and how to use NonCancellable correctly for safe cleanup.

Inside the Compose Compiler Plugin: From @Composable to Synthetic Parameters

How the Compose Compiler Plugin transforms @Composable functions at the IR level, covering $changed bitmasks, skip logic generation, state read/write markers, and stability inference rules.

A Practical Guide to On-Device AI Pipelines with Kotlin Flow

Model on-device inference as a declarative, composable pipeline of Preprocess, Inference, and Postprocess stages wired together with Kotlin Flow operators, backpressure, and layered tests.

Managing On-Device AI Inference Lifecycles with Kotlin Coroutines

How to use structured concurrency to manage Android on-device AI inference: GPU resource release ordering, actor-style serialization, and cancellation propagation.

Inside Jetpack Compose List Animations: From animateItem to Declarative Choreography

A practical walkthrough of animateItem internals, key stability, recomposition scoping, and frame-rate tuning for LazyColumn.

Android Share Framework: ShareCompat, Chooser, and Dynamic Targets

An end-to-end look at Android sharing, from ShareCompat intent construction and Chooser target resolution to Direct Share dynamic targets and Compose integration.

Compose Multiplatform Desktop in Practice: JVM Windows and Platform Interop

A practical migration from Electron to Compose Desktop, covering JVM window management, menu bars, drag and drop, system trays, platform interop, packaging, and distribution. Startup time improved by 60% and memory usage dropped by 70%.

Custom Android Cache Strategies: FirstCache, FirstNet, OnlyNet, and Timeout

Cache strategy is more than choosing whether to read cache or network first. It affects screen speed, weak-network behavior, data consistency, and code complexity. This article presents a unified strategy enum, CacheManager layer, and Flow-based state model.

Kotlin Type-Safe Builders and DSL Design: Receivers, Scopes, and @DslMarker

Starting from a Compose nesting error, this guide explains Kotlin DSL design through lambda with receiver, @DslMarker scope control, Compose, Gradle KTS, and custom builders.