None
NL
Build intelligent Android apps: Cloud and hybrid inference
[]
Android Developers Blog
In our previous post we explored how to build intelligent on-device features using Gemini Nano through ML Kit's Prompt API.
Other times, you want the best of both worlds: using hybrid inference to run on-device when available to lower costs, while falling back to the cloud to ensure compatibility for all devices.
Cloud and hybrid features in Jetpacker: Museum assistant with web grounding, hybrid restaurant review drafting, and support chat featuring custom-routed live translation.
Detect language using ML Kit Language Identification val sourceLang = try { Tasks.await(languageIdentifier.identifyLanguage(message.text)) } catch (e: Exception) { "Undefined" } // 2.
ConclusionBy combining cloud model capabilities (grounding, system instructions) with on-device capabilities (hybrid routing, translation, security app checks), we created a travel app that is smart, secure, and available offline.