
OCT 28 - 29, 2026
UGANDA


( SPEAKER )
Ahmed Nabil
Google Developers Expert (GDE) for Android
Bridging the Gap: How We Built Hybrid Mobile AI Before Google Made it Native
In mobile AI, picking between cloud-based models and on-device execution used to feel like a forced compromise:
The Cloud (Gemini Pro): Deep reasoning and multimodal magic, but dependent on network connectivity and latency.
On-Device (Gemini Nano): Blazing fast, offline, and private, but bounded by device memory and model capacity.
Why choose when you can have both?
Before native framework support existed, forward-thinking developers had to engineer custom "Smart Routers"—combining Firebase AI Logic and ML Kit to inspect network state, hardware capabilities, and request complexity to dynamically switch routes on the fly.
Fast forward to today: Google has adapted this hybrid pattern directly into the official Firebase AI SDK, giving developers out-of-the-box hybrid orchestration, policy-based routing, and dynamic fallback out of the box.
In this practical, code-heavy session, we will explore the architectural evolution of mobile AI routing. We'll examine how we used to build custom orchestration layers, how the new native Firebase Hybrid SDK simplifies the codebase, and walk through a live demo comparing both approaches under real-world edge cases (airplane mode, weak network, and heavy multimodal payloads).
1. The Mobile AI Spectrum (5 Mins)
Cloud vs. On-Device: Trade-offs in latency, privacy, bandwidth cost, and reasoning power.
Why Hybrid is the Golden Standard: Moving beyond simple API calls to adaptive edge-cloud architecture.
2. The "DIY Era": Building Custom Smart Routers (10 Mins)
Architecture Walkthrough: How we manually wired Firebase AI Logic (Cloud) and ML Kit GenAI (Local).
Router Logic in Action: Inspecting isOnline, hardwareCapability, and prompt complexity in Kotlin.
Lessons Learned: Edge cases, battery overhead, and state management headaches of custom routing.
3. The Native Shift: Firebase's Out-of-the-Box Hybrid Engine (10 Mins)
What changed? Anatomy of the new native Firebase Hybrid SDK features.
Configuration Policies: Deep dive into routing policies (PREFER_ON_DEVICE, PREFER_IN_CLOUD, fallback strategies).
Code Migration: Moving from custom routing logic into a few clean SDK initialization parameters.
4. Live Demo & Benchmarks (10 Mins)
Live App Showcase: Real-time demonstration of an adaptive AI app in three environments:
High-speed 5G (Cloud execution).
Subway / Airplane mode (Instant local failover via Gemini Nano).
Multimodal photo reasoning (Dynamic route selection).
Performance Telemetry: Side-by-side comparison of latency, memory footprints, and network payloads.

_svg.png)