Avatar

Kai | Deep Android Engineering Notes

Deep notes on Android Framework, performance, Jetpack Compose, Kotlin, on-device AI, and mobile engineering.

Deep Android Engineering Notes

Android engineering knowledge base cover

A searchable knowledge base for Android Framework internals, performance optimization, Jetpack Compose, Kotlin coroutines, on-device AI, CI/CD, and mobile architecture.

Topic Index

Writing

AGP 9 R8 Keep Rules: Fixing a WorkManager InputMerger Upload Failure

An AGP 9.0.1 migration removed a constructor needed by WorkManager 2.8.1. Analytics uploads fell back to disk scanning, distorting arrival-time ordering.

Android CompatChange: PlatformCompat Behavior Toggles and targetSdk Governance

A close look at Android's PlatformCompat framework: the CompatChange decision path, adb debug toggles, vendor overlay pitfalls, and the adaptation engineering methodology behind targetSdk version governance.

Android Transformer Optimization: Attention and Mobile GPU Bottlenecks

A walkthrough of porting FlashAttention into an OpenGL ES Compute Shader on Android, using tiled computation and Online Softmax to cut attention memory traffic from O(n²) to O(n). Measured on the Mali-G710, latency dropped from 120ms to 18ms.

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.

How Android Private Space Works: Multi-User Isolation and FBE Encryption

Private Space is not simply hiding icons — it is a privacy container built from multi-user isolation, FBE file-level encryption, and system service coordination. This post walks through the full chain from user sandbox to key eviction.

Android Geofence End to End: Registration, Triggering, and Doze Failures

A full walkthrough of Android geofences from registration to triggering: PendingIntent callbacks, fused location, and how Doze power-saving causes trigger failures—with power optimization practices.

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.

Android Audio Capture End to End: AudioRecord, Echo Cancellation, and On-Device ASR

A complete walkthrough of Android audio capture: AudioRecord buffer tradeoffs, AAudio low-latency input, echo cancellation, on-device ASR data adaptation, and a practical reference architecture for simultaneous playback and listening.

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.