| name | android-gemini-nano |
| description | Use when integrating Google Gemini Nano via AICore for on-device ML. |
| category | ai-native |
| risk | medium |
| source | community |
| date_added | 2026-04-07 |
| metadata | {"triggers":["@gemini-nano","aicore","on-device ai"]} |
Android Gemini Nano On-Device Integration 🧠
Gemini Nano allows for powerful, completely on-device AI generation. Because it runs locally via the AICore Android system service, careful life-cycle and asynchronous resource management is required.
⚡ When to Use
- When building chat interfaces, generating summaries, or drafting text without cloud latency.
- When the user asks to integrate "Gemini Nano" or "AICore".
🏗️ Core Rules / Pillars
1. AICore Dependency and Availability Check
2. Streaming Responses with Flow
🚧 Critical Anti-Hallucination Guards
- Trap:
GenerativeModel is part of the com.google.ai.client.generativeai SDK. Do NOT hallucinate custom AICoreManager wrapper singletons.
🔗 Related Resources