Skip to content

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android + AI Cookbook

Build AI features in Android apps with Kotlin and Jetpack Compose.

Want to add Gemini Live, use ML Kit, run AI on-device, or build an agent with ADK? Explore the runnable samples, then pick a topic to follow its learning path.

New preview: PocketCommunity — A2UI + DevEarth: native event and preparation surfaces inside one conversation. Live Gemini agent required; key stays on the companion server.

Sample apps

Each sample is an independent Android Studio project, focused on one Android + AI topic.

PocketCards showing an AI-generated flashcard, All / Due / Favorites tabs, and daily progress

PocketCards

Turn your notes into knowledge.

An AI flashcard app: paste study notes, generate questions and answers with Gemini, review the result, and study your saved deck.

Topic: AI Fundamentals
Level: Introductory AI integration
Status: Runnable sample · learning content in progress

  • Firebase AI Logic and structured model output
  • Prompting, validation, cancellation, and failure handling
  • Jetpack Compose, Material 3, MVVM, and Navigation 3
  • Local decks, favorites, daily review dates, and progress
  • Light and dark themes; unit and device tests

Browse & run → · Hands-on codelab · Learning roadmap

Manual cards and the sample deck work without setup. AI generation uses your own Firebase project. Screenshots show the running app.

PocketCook running on an Android phone, with recipe steps and a Talk to PocketCook voice action

PocketCook

A little help, hands-free.

A cooking companion: choose a recipe, follow the steps, and ask Gemini for spoken guidance while you cook.

Topic: Gemini Live in Android
Level: Intermediate realtime voice integration
Status: Runnable core · academy update awaiting deployment

  • Direct Gemini Live over WebSocket, without Firebase
  • Microphone capture, PCM streaming, and speaker playback
  • Interruptions, mute, transcripts, and lifecycle cleanup
  • Jetpack Compose, Material 3, MVVM, and offline recipe progress
  • Audio regression tests, physical-device checks, and light/dark themes

Browse & run → · Learning roadmap · Codelab source (deployment pending)

Recipes work offline. Voice uses your own Gemini key entered in the debug app; release voice is not yet available. Screenshot shows the real app before starting voice. Camera and tools are future extensions.

PocketChat running on Android, with a blue home screen, New chat, starter prompts, and saved conversations

PocketChat

Explore ideas together.

An Android Engineers AI learning companion: ask questions, watch Gemini answers stream, continue the conversation, and save useful ideas. Explore our roadmaps, codelabs, courses, and optional 1:1 mentorship through a curated resource directory.

Topic: Gemini Chat for Android
Level: Intermediate conversation and streaming integration
Status: Runnable core · dedicated roadmap and codelab planned

  • Direct Gemini text streaming over SSE, without Firebase
  • Multi-turn context, Stop/Retry, and stale-response protection
  • Room-backed history, saved answers, and draft recovery
  • Android Engineers system instructions and curated learning links
  • Jetpack Compose, Material 3, MVVM, and light/dark themes

Browse & run → · Learning plan · Architecture

Chat uses your own Gemini key entered in the debug app. History works offline. Screenshot shows the actual home screen before the branding update. Structured takeaways, tool calling, and production cloud access are future milestones.

PocketStories preview showing its light-theme bookshelf and bundled story illustration

PocketStories

Ordinary things. Extraordinary tales.

A camera-to-story app in development, exploring Gemma on Android with local model downloads and a private bookshelf.

Topic: Gemma on Android
Level: Intermediate on-device multimodal integration
Status: Building / Preview · end-to-end generation under validation

  • CameraX capture, Photo Picker and bounded image preparation
  • Resumable model downloads, SHA-256 verification and private storage
  • LiteRT-LM integration, multimodal prompts, streaming and native cancellation
  • Compose, MVVM, Room stories and draft checkpoints
  • Model selection, hardware constraints and honest device verification

Explore the preview → · Learning plan · Verification & limitations

Actual app screenshot; illustration is bundled artwork. No successful AI story generation is claimed. Build and automated tests pass; the tested emulator hits a GPU buffer limit. Physical-device generation and the academy codelab remain unverified/unpublished.

PocketCommunity rendering Gemini-generated DevEarth event discovery on a physical Android phone PocketCommunity retaining a checked item in a Gemini-refined preparation checklist

PocketCommunity

Find your people. Get ready for your next developer event.

Discover DevEarth events, explore venues, and prepare for your visit in one conversation. Gemini composes interactive native UI from a restricted component catalog.

Topic: A2UI and agent-generated Android UI
Level: Intermediate agent and UI integration
Status: Live-agent preview · physical-phone flow verified · roadmap and codelab planned

  • Official AndroidX A2UI parser, processor, and Material component catalog
  • Surfaces, component trees, data bindings, and outgoing actions
  • Conversation context and checkbox state sent back to Gemini
  • Validated component graphs, controlled links, setup and retry handling
  • Server-only Gemini credentials and an inspectable protocol flow

Browse & run → · How A2UI works · Verification & limitations

Actual live-generated UI on a physical Android phone. Artwork is a bundled illustration. Requires the companion server with your own Gemini key; no scripted runtime fallback. Production hosting and durable conversations are not implemented.

What do you want to build?

25 topics · 3 runnable samples · 2 previews · 20 planned apps. Start with PocketCards for AI fundamentals, PocketCook for realtime voice, or PocketChat for streaming conversations. PocketCook's expanded lessons and codelab are committed in the website repository and awaiting deployment. Each app README documents setup, verification, and remaining limitations.

Add AI to your Android app

Topic What you’ll learn
Gemini Live in Android PocketCook: direct voice conversations, PCM audio, interruptions, and explicit session restart.
ML Kit GenAI + Gemini Nano Add on-device text and image features with capability checks.
On-device AI for Android Run models locally and understand downloads, memory, and device support.
Gemini Chat for Android PocketChat: streaming conversations, Stop/Retry, local history, saved answers, and an Android Engineers AI guide.
Firebase AI Logic Connect an Android app to Gemini with Firebase and App Check.
Voice AI for Android Build speech-to-text, AI responses, text-to-speech, and turn-taking.
Multimodal Android apps Combine camera, images, audio, and text in an AI feature.

Explore open models, local search, and computer vision

Topic What you’ll learn
Gemma on Android PocketStories (Preview): camera-to-story integration, verified model downloads, local persistence and hardware compatibility.
LiteRT and LiteRT-LM Run custom models locally and understand the inference runtime.
RAG and embeddings Search personal notes and answer questions with source citations.
FunctionGemma and local tool calling Turn a natural-language request into an approved app action.
ML Kit vision and text Build OCR, barcode scanning, and other camera-based ML features.
MediaPipe for Android Build live perception features such as gesture and pose detection.

Build agents and connect tools

Topic What you’ll learn
A2UI for Android PocketCommunity (Live-agent preview): Gemini-composed native UI, component catalogs, bound checklists, and action feedback.
ADK for Kotlin Build JVM agents with tools, sessions, and orchestration.
ADK for Android Put an agent in your Android app with lifecycle-aware sessions and local tools.
Koog for Kotlin Build AI agents with the Kotlin-based Koog framework.
MCP for Android developers Connect an Android experience to tools through a controlled backend.
Android AppFunctions Expose app actions with typed inputs, permissions, and confirmation.

Learn the foundations and ship your app

Topic What you’ll learn
AI for Android — start here PocketCards: turn notes into flashcards and learn the AI fundamentals.
Production AI on Android Handle failures, evaluation, privacy, costs, and rollout.
Gemini in Android Studio Use AI assistance and Agent Mode to implement and debug features.
Android CLI Build and verify Android projects from the terminal.
Android Skills Use Android development skills to guide and check project changes.
Create agent skills for Android Write reusable workflows for your coding agent.

Find your way around

android-ai-cookbook/
├── adk-android/
├── adk-kotlin/
├── agent-skills/
├── ai-fundamentals/
├── android-cli/
├── android-skills/
├── appfunctions/
├── firebase-ai-logic/
├── functiongemma/
├── gemini-chat/
├── gemini-in-android-studio/
├── gemini-live/
├── gemma/
├── koog/
├── litert/
├── mcp/
├── mediapipe/
├── ml-kit-genai/
├── ml-kit-vision/
├── multimodal-ai/
├── on-device-ai/
├── production-ai/
├── rag-and-embeddings/
├── voice-ai/
└── docs/                     # Feature index and contribution guidance

Browse all feature guides and their status. Each topic folder will hold its own dedicated project when implemented.

New to Android + AI?

Start with AI for Android fundamentals, then choose the topic for the app you want to build.

Build plan and engineering

Follow the app implementation order, engineering standards, and roadmap/codelab learning contract. Development uses official Android skills and project-local guidance.

Help grow the cookbook

Have a recipe idea or want to add a sample? Read the contribution guide and use the recipe template.

Maintained by Android Engineers · Android Engineers Academy · Apache 2.0

About

Six runnable Android + AI recipes in Kotlin and Compose: streaming, Firebase setup, cancellation, validation, retries, and ADK tools. Fixture-tested.

Topics

Resources

Contributing

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages