Leanpub Header

Skip to main content

The Kotlin & AI Masterclass

These books have a total suggested price of $47.97. Get them now for only $29.00!
About

About

About the Bundle

The Android AI Engineer Masterclass: Complete 3-Volume Bundle

From Cloud API Consumer to Native Silicon AI Engineer. Master Gemini Nano, NPU Acceleration, and Autonomous Agents with Modern Kotlin.

Stop Calling Cloud APIs. Start Building On-Device Brains.

The mobile industry has reached a turning point. Users demand zero latency, strict data privacy, and full offline capability. Relying exclusively on paid cloud endpoints is no longer sustainable for modern mobile architectures. The industry now demands Android AI Engineers—developers who can deploy Large Language Models (LLMs) on-device, squeeze maximum throughput out of mobile silicon, and orchestrate autonomous agents directly inside Android OS.

This comprehensive 3-volume bundle provides the definitive, production-grade roadmap to mastering edge intelligence. Designed specifically for experienced Android engineers, this masterclass cuts through theoretical fluff to deliver production architecture, real-world benchmarks, and idiomatic Kotlin code.

What’s Included in This Bundle

By purchasing this bundle, you get all three complete volumes covering the entire modern mobile AI stack:

Book 1: On-Device GenAI — Mastering Gemini Nano and Local LLMs

Learn how to run Generative AI directly on mobile hardware without recurring cloud fees or privacy compromises.

  • Android AICore Deep Dive: Interface with Android's system-level AI provider to unlock Gemini Nano on supported devices.
  • Open-Source LLMs on Android: Deploy models like Gemma and Llama using Google MediaPipe LLM Inference APIs.
  • Local Vector Databases & RAG: Build private, offline Retrieval-Augmented Generation (RAG) pipelines using Room, local embeddings, and vector similarity search.
  • Reactive Token Streaming: Architect fluid, non-blocking chat and generative UIs with Kotlin Flow and Jetpack Compose.

Book 2: Edge AI Performance — Optimizing NPU and GPU for Mobile Inference

Bridge the gap between experimental models and battery-friendly, 60-FPS production apps.

  • Hardware Acceleration: Master hardware execution delegates for Qualcomm and Tensor NPUs (Neural Processing Units), GPUs, and DSPs.
  • Model Compression & Quantization: Apply Post-Training Quantization (INT8 vs. FP16), weight pruning, and knowledge distillation without breaking accuracy.
  • Zero-Copy Image Pipelines: Harness CameraX and native HardwareBuffers for real-time video inference with zero memory copy overhead.
  • Thermal & Power Profiling: Diagnose ANRs, prevent thermal throttling, and manage memory constraints to avoid low-memory kills (OOMs).

Book 3: Android AI Agents — Building Autonomous Task-Oriented Apps

Move past static chatbots and build reactive agents that understand user context and take real actions.

  • Tool Calling & Function Injection: Teach LLMs to reliably invoke your Kotlin functions, business repositories, and system endpoints.
  • System & Screen Awareness: Safely leverage Android Intents, Accessibility APIs, and sensor fusion to give your agent actionable contextual awareness.
  • Agentic Orchestration: Construct resilient ReAct loops, planning mechanisms, and long-term conversational memory using LangChain4j and structured Kotlin Coroutines.
  • Safety & Guardrails: Implement human-in-the-loop confirmation flows and sandboxed execution to keep autonomous actions predictable and secure.

Why Buy the Bundle?

Each volume is designed to solve one pillar of mobile AI engineering:

  1. Volume 1 brings models onto the device.
  2. Volume 2 ensures they run blisteringly fast without destroying battery life.
  3. Volume 3 transforms passive inference into active, autonomous utility.

Studied together, this bundle gives you an end-to-end competitive advantage that standard mobile developers simply do not have.

What You’ll Get

  • DRM-Free Formats: EPUB for reading across your phone, tablet, e-reader, or laptop.
  • Accompanying Source Code Pack: Clean, modular Kotlin files organized by chapter, featuring production architectures (MVVM/MVI, Hilt, Jetpack Compose, Coroutines).

Who This Is For

  • Senior Android Developers looking to transition into edge AI and on-device machine learning.
  • Mobile Architects & Tech Leads evaluating local inference vs. cloud costs, latency trade-offs, and data compliance (GDPR, CCPA).
  • AI Engineers who know Python and model training, but need to understand the constraints and native pipelines of modern Android engineering.

Prerequisites: Familiarity with Kotlin, Jetpack Compose, and basic Android architecture. No prior machine learning degree or Python expertise required—all AI concepts are explained through native Android idioms.

Books

About the Books

On-Device GenAI with Android Kotlin

On-Device GenAI with Android Kotlin

Mastering Gemini Nano, AICore, and local LLM deployment using MediaPipe and Custom TFLite models

Unlock the Power of On-Device Intelligence with the Android Kotlin & AI Masterclass.

The era of Cloud-only AI is over. Today’s users demand privacy, offline capability, and zero latency. To meet these needs, Android developers must evolve into Mobile AI Engineers. This volume is your definitive guide to mastering Generative AI directly on the Android platform.

Whether you want to integrate Gemini Nano, deploy custom Gemma or Llama models, or build a local Retrieval-Augmented Generation (RAG) pipeline, this book provides the production-grade architecture and code you need.

What’s inside:

  • AICore Deep Dive: Learn how to interface with Android's system-level AI provider to access Gemini Nano efficiently.
  • Local Vector Databases: Implement semantic search using Room, embeddings, and Cosine Similarity math.
  • MediaPipe LLM Inference: Step-by-step implementation of on-device LLMs without the "Cloud Tax."
  • Advanced Kotlin & Compose: Master Kotlin Flow for token streaming and Jetpack Compose for reactive AI interfaces.
  • Hardware Orchestration: Expert techniques for memory management, preventing OOM errors, and handling thermal throttling.
  • Privacy-First Patterns: Build apps where sensitive data never leaves the device.

Packed with "Jira-style" practical exercises, advanced architectural patterns (MVI/Hilt), and deep-dive technical analysis, this volume is more than a tutorial—it is a masterclass in the future of mobile engineering.

Stop calling APIs. Start building brains. Take your Android career to the next level today!

Edge AI Performance with Android Kotlin

Edge AI Performance with Android Kotlin

Optimizing hardware acceleration via NPU, GPU, and DSP. Advanced quantization and model pruning

Master the Art of High-Performance Edge AI on Android

Push the boundaries of mobile intelligence with Volume 2: Edge AI Performance with Android Kotlin. This masterclass volume moves beyond basic model execution to explore the deep hardware orchestration required to run complex neural networks at 60 FPS on mobile silicon.

In this book, Edgar Milvus provides an engineering-first approach to optimizing AI workloads. You will learn to navigate the "Memory Wall", handle Thermal Throttling, and master the heterogeneous compute landscape of modern Android SoCs.

What's Inside:

  • Hardware Acceleration: Deep dives into targeting NPUs, GPUs, and DSPs via NNAPI and AICore.
  • Advanced Quantization: Techniques for INT8 and FP16 Post-Training Quantization and Quantization-Aware Training (QAT).
  • Model Pruning & Sparsity: Reducing model complexity while maintaining accuracy for high-speed inference.
  • NDK & C++ Optimization: Writing custom operations in C++ to achieve zero-copy image processing performance.
  • Real-time Vision & Audio: Architecting pipelines for 60 FPS video segmentation and low-power audio sentinels.
  • Modern Kotlin Integration: Using Kotlin 2.x Context Receivers, Flow, and Coroutines for high-concurrency AI tasks.

Build Production-Ready AI Features

From Knowledge Distillation to Thermal-Aware Schedulers, this volume provides the practical exercises and professional-grade code snippets needed to ship AI-powered apps that are fast, battery-efficient, and thermally stable.

Whether you are a Senior Android Developer or an ML Engineer, this book is your definitive guide to the "Last Mile" of mobile AI deployment.

Android AI Agents. Building autonomous apps that use Tool Calling, Function Injection, and Screen Awareness to perform tasks for the user

Android AI Agents. Building autonomous apps that use Tool Calling, Function Injection, and Screen Awareness to perform tasks for the user

Unlock the Power of Autonomous AI Agents on Android

Stop building chatbots and start building agents. The next frontier of mobile development isn't just about integrating AI—it's about giving AI the "limbs" to interact with the operating system. Android AI Agents: The Personal OS Concierge is a masterclass in building autonomous, multi-modal systems using Kotlin 2.x and Gemini Nano.

This volume provides a rigorous, engineering-focused approach to Contextual Awareness, Tool Calling, and Screen Analysis. Whether you are looking to automate cross-app workflows or implement a private, on-device research assistant, this book provides the theoretical foundations and production-ready code you need.

What’s Inside:
  • The ReAct Loop: Architecture for agents that think, act, and observe.
  • AICore & Gemini Nano: Mastering Android’s system-level AI provider.
  • Multimodal Intelligence: Fusing camera, sensors, and text for total environmental awareness.
  • Safety Rails: Implementing Human-in-the-Loop patterns and secure sandboxes for dynamic logic.
  • Advanced Tooling: Teaching LLMs to use Android Intents, Calendar, Contacts, and Web Search APIs.

Designed for Senior Developers and Architects, each chapter includes deep technical dives, hardware-aware orchestration strategies, and practical exercises with explained solutions. Move beyond the API call and learn to build the future of the Android OS.

Embrace the Agentic Era. Master the Personal OS Concierge today.

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub