On this page
Our Cloud vs On-Device AI article compares the approaches in general. This one is specific to Google's Gemini family on Android: what Nano can and can't do, what cloud models add, and how to use both.
Two paths to Gemini
Side-by-side
| Gemini Nano (on-device) | Cloud Gemini (Firebase AI Logic) | |
|---|---|---|
| Device support | Limited set of recent devices with AICore. Check the supported list. | Any device with network |
| Capability | Small model: summarise, rewrite, proofread, describe images, short prompts | Much stronger reasoning, long context, multimodal, tools |
| Input limits | Small context (e.g. summarisation under ~4,000 tokens) | Large context windows |
| Languages | Limited per feature (e.g. summarisation: English, Japanese, Korean) | Broad |
| Privacy | Data stays on device | Data sent to Google; review terms |
| Offline | Yes (after model download) | No |
| Cost | No per-call cost | Per-token pricing (free tier available) |
| Constraints | Foreground only, per-app quotas, battery limits | Rate limits, App Check enforcement |
| Status | ML Kit GenAI APIs in beta | Generally available |
Model names and limits change frequently. Current cloud models include gemini-3.8-flash and gemini-3.5-flash-lite. Check the models page before shipping.
Hybrid inference
Firebase AI Logic offers experimental hybrid inference: the SDK uses on-device Gemini Nano when available, otherwise the cloud model:
val model = Firebase.ai(backend = GenerativeBackend.googleAI()).generativeModel(
modelName = "gemini-3.8-flash", // cloud fallback
onDeviceConfig = OnDeviceConfig(mode = InferenceMode.PREFER_ON_DEVICE),
)
val reply = model.generateContent("Rewrite politely: $draft").textBecause the experimental API may change, follow the hybrid inference docs for the exact dependency and names.
If the feature falls back to the cloud, data leaves the device on some phones. Disclose this, or offer an "on-device only" setting that disables the fallback for sensitive content.
How to choose
- Sensitive data, offline need, simple task โ Nano where available, with a non-AI fallback elsewhere.
- Must work on every device, harder task โ cloud Gemini.
- Simple task, wide reach, cost-sensitive โ hybrid: Nano when present, cloud otherwise.
- Long documents or complex reasoning โ cloud.
Use cases
Smart reply drafts
Nano rewriting on supported devices: private, instant.
Study Q&A
Cloud model for reasoning over long material. See AI Study Assistant.
Note summaries
Hybrid: on-device when possible, cloud for long notes.
Frequently asked questions
Can I call Gemini Nano with any prompt?
ML Kit's Prompt API allows custom prompts on supported devices, within Nano's smaller capability and context limits. Task-specific APIs (summarise, rewrite) are more tuned.
Is Nano free?
There's no per-call charge, but it only runs on supported devices, in the foreground, within quotas.
Conclusion
Gemini Nano offers private, offline, free inference for simple tasks on supported devices. Cloud Gemini offers stronger models everywhere at a per-token cost. Hybrid inference combines them, with clear disclosure.
Next step: run your own models on device with LiteRT and LiteRT-LM.
Official references
๐ฑ Apps built by Yunok Tech
Real Android apps on Google Play, free to download.
Walzi4K wallpapers for lock and home screenGet it โธ
NotiVaultNotification history: recover dismissed notificationsGet it โธ
Ready to build real Android applications?
Every AI feature still runs inside an Android app that has to be fast, reliable and well structured. Strengthen the Kotlin, Jetpack Compose and architecture skills that AI integrations depend on, then apply these AI concepts with confidence.
Move beyond theory and strengthen your Android development skills with Yunoktech's Android course. Learn core concepts, practical implementation, modern Android development techniques, and the reasoning behind building maintainable applications.
Explore the Android course and take your next step as an Android developer.