A tutorial on building on-device AI features in Android apps using Gemini Nano 4 via ML Kit's Prompt API. Three practical features are demonstrated: trip itinerary summarization, receipt parsing with structured output using the Structured Output API, and voice note transcription with speech recognition. The post covers prompt optimization using the AICore developer preview, multimodal image understanding for OCR, and combining the Speech Recognition API with the Prompt API. Code samples in Kotlin show how to configure model preferences (FAST vs FULL) and use the @Generable annotation for typed structured output.
Table of contents
On-device features in Jetpacker: Summarizing trip itineraries, managing expenses, and voice notes High quality tailored summarization of short textsLocal processing for sensitive user inputMultimodal inputConclusionLearn more896 Impressions