{"id":3594,"date":"2026-09-23T10:11:58","date_gmt":"2026-09-23T10:11:58","guid":{"rendered":"https:\/\/dev95.site\/build-intelligent-android-apps-cloud-and-hybrid-inference\/"},"modified":"2026-09-23T10:11:58","modified_gmt":"2026-09-23T10:11:58","slug":"build-intelligent-android-apps-cloud-and-hybrid-inference","status":"publish","type":"post","link":"https:\/\/dev95.site\/ar\/build-intelligent-android-apps-cloud-and-hybrid-inference\/","title":{"rendered":"Build intelligent Android apps: Cloud and hybrid inference"},"content":{"rendered":"<div id=\"dev95-2559525953\" class=\"dev95-- dev95-entity-placement\"><script async=\"async\" data-cfasync=\"false\" src=\"https:\/\/pl27862732.profitableratecpmnetwork.com\/2ad7a50e0bbc23ac6801d7b77c501463\/invoke.js\"><\/script>\r\n<div id=\"container-2ad7a50e0bbc23ac6801d7b77c501463\"><\/div><\/div><div><meta content=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiBHTpa22SxEltoebLZYO_34iRtahN8z5tA3tnIryIii0s4_conN5qFYfmNro6nmZBfsgiZeRLtru-gE4XO2mf-RBDyIo00kf3QunWwUO-SICHkVSv0exAQQ4qA0KzjMGRpA8qj1TSMP0Ffe0FzrEc_S1zBaakKzCZFpqYLXqds9Zqmqr8yyeSgyNl9U0s\/s2469\/features in Jetpacker Features with Firebase AI Logic _Meta.png\" style=\"clear: right; float: right; margin-bottom: 1em; margin-left: 1em;\"><br \/>\n<img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiBHTpa22SxEltoebLZYO_34iRtahN8z5tA3tnIryIii0s4_conN5qFYfmNro6nmZBfsgiZeRLtru-gE4XO2mf-RBDyIo00kf3QunWwUO-SICHkVSv0exAQQ4qA0KzjMGRpA8qj1TSMP0Ffe0FzrEc_S1zBaakKzCZFpqYLXqds9Zqmqr8yyeSgyNl9U0s\/s2469\/features%20in%20Jetpacker%20Features%20with%20Firebase%20AI%20Logic%20_Meta.png?w=1280&#038;ssl=1\" style=\"display: none;\"><\/p>\n<div><i>Posted by Thomas Ezan, Jolanda Verhoef, Caren Chang, Senior Developer Relations Engineers, Android Developer Relations<\/i><\/div>\n<div><\/div>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjn2fO3T2xckksQ9pk3RUNPxZqqq2CyaifXnju0lCCpbfwJ4gZyq-df0kM_mK1TMV0F9YCMo19Ba9NvFAiUpzDH6Wlk_RyonRCK5Ono25CYyQ7xGC3q70mUhyphenhyphenOOYJ-5JX2KlFP1lIA3ULIhH86_hP2ptO0AllUIf6ZVh-SqoXVWcXrM8m3hHCkhGwZYfP4\/s8583\/AFD%20-%20%5BABL_101%5D%20Building%20AI%20features%20in%20Jetpacker%20Features%20with%20Firebase%20AI%20Logic%20_Blog.png?ssl=1\" style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\"><img data-recalc-dims=\"1\" decoding=\"async\" border=\"0\" data-original-height=\"2601\" data-original-width=\"8583\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjn2fO3T2xckksQ9pk3RUNPxZqqq2CyaifXnju0lCCpbfwJ4gZyq-df0kM_mK1TMV0F9YCMo19Ba9NvFAiUpzDH6Wlk_RyonRCK5Ono25CYyQ7xGC3q70mUhyphenhyphenOOYJ-5JX2KlFP1lIA3ULIhH86_hP2ptO0AllUIf6ZVh-SqoXVWcXrM8m3hHCkhGwZYfP4\/s1600\/AFD%20-%20%5BABL_101%5D%20Building%20AI%20features%20in%20Jetpacker%20Features%20with%20Firebase%20AI%20Logic%20_Blog.png?w=1280&#038;ssl=1\"><\/a><\/div>\n<p><\/p>\n<p><\/p>\n<p>Welcome back to the blog post series &#8220;<a href=\"http:\/\/android-developers.googleblog.com\/2026\/07\/build-intelligent-android-apps-introduction-jetpack.html\" target=\"_blank\">Build intelligent Android apps<\/a>&#8221; where we take a basic Android app and transform it into a <b>personalized<\/b>, <b>intelligent<\/b>, and <b>agentic<\/b> experience. In our <a href=\"http:\/\/android-developers.googleblog.com\/2026\/07\/android-on-device-inference.html\">previous post<\/a> we explored how to build intelligent on-device features using Gemini Nano through ML Kit&#8217;s Prompt API.<\/p><div id=\"dev95-3015898456\" class=\"dev95- dev95-entity-placement\"><center>\r\n<script>\r\n  atOptions = {\r\n    'key' : '4ba6b6513c00e0ba76511f798ae56401',\r\n    'format' : 'iframe',\r\n    'height' : 50,\r\n    'width' : 320,\r\n    'params' : {}\r\n  };\r\n<\/script>\r\n<script src=\"https:\/\/www.highrevenueformat.com\/4ba6b6513c00e0ba76511f798ae56401\/invoke.js\"><\/script>\r\n\t<\/center><\/div>\n<p>In this post, we will look at how you can leverage <b><a href=\"https:\/\/firebase.google.com\/docs\/ai-logic\">Firebase AI Logic<\/a> <\/b>to build cloud-hosted and hybrid AI features:\u00a0<\/p>\n<ul>\n<li>Grounding answers in real-world context<\/li>\n<li>Routing requests dynamically between cloud and local execution using hybrid inference<\/li>\n<li>Translating content with custom routing systems<\/li>\n<\/ul>\n<div style=\"margin: 0px auto; width: 100%;\">\n  <iframe allowfullscreen=\"\" src=\"https:\/\/www.youtube.com\/embed\/_iuXykdlTkk\" style=\"aspect-ratio: 16\/9; border: 0; width: 100%;\"><br \/>\n  <\/iframe>\n<\/div>\n<p><\/p>\n<p>Sometimes a use case requires AI models with greater world knowledge, a much larger context window, or the ability to handle complex queries. In those scenarios, we can leverage cloud models.\u00a0<\/p>\n<p>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.<\/p>\n<p><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhwlTUF1Kzkbrf2w64KO3jZJZZ_wLEu34vq6Cb7PX2alVUhFVdbkiWuXCkzUS-bPJkHMbmuNJ_Ov0HYZzujr69jCU9gPvmKaKMZt2q4-TolSDFCLABBIY1IBRY9Zn7D5S10hFcJD2kuVCm3N2glpqDJoHiqAZat4z6oyXxxwH4ZCGVBgfPObMevoJrgNPg\/s8000\/features_upscaled.png?ssl=1\" style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\"><img data-recalc-dims=\"1\" decoding=\"async\" border=\"0\" data-original-height=\"4744\" data-original-width=\"8000\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhwlTUF1Kzkbrf2w64KO3jZJZZ_wLEu34vq6Cb7PX2alVUhFVdbkiWuXCkzUS-bPJkHMbmuNJ_Ov0HYZzujr69jCU9gPvmKaKMZt2q4-TolSDFCLABBIY1IBRY9Zn7D5S10hFcJD2kuVCm3N2glpqDJoHiqAZat4z6oyXxxwH4ZCGVBgfPObMevoJrgNPg\/s1600\/features_upscaled.png?w=1280&#038;ssl=1\"><\/a><\/div>\n<p><em style=\"text-align: left;\">Cloud and hybrid features in Jetpacker: Museum assistant with web grounding, hybrid restaurant review drafting, and\u00a0<br \/>\n  support chat featuring custom-routed live translation.<\/em><\/div>\n<p>Let\u2019s look at how we implemented three cloud and hybrid features in <a href=\"https:\/\/github.com\/android\/ai-samples\/tree\/main\/jetpacker\" target=\"_blank\">Jetpacker<\/a>:<\/p>\n<ul>\n<li>a museum assistant with web grounding<\/li>\n<li>hybrid restaurant review drafting<\/li>\n<li>hotel support chat featuring custom-routed live translation.<\/li>\n<\/ul>\n<h2>Use LLM grounding for up-to-date informationMuseum assistant chatbot with LLM grounding<\/h2>\n<p>The <b>Museum assistant <\/b>is an interactive chatbot designed to help users plan their museum visits. It provides visitors with up-to-date details regarding specific exhibits, current opening hours, ticket pricing, and more.<\/p>\n<p><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><em style=\"text-align: left;\"><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEj3pxeCVJfOo5G7McNB4RCIhoCUch8CHSAWI7gHijJJcE95b0gbu3lyAO1xIWc6mKllkpylSPBnVfU6RYnwfay4z6dH7TlufPuNw3Lw7s-bEuR4Ajx8IHK8k6zJcOHitqMRdDv8EVL-fCN6uuDo1QTnOgk_RW-AEM1_hZaJWbCGezMQF_D9Hia-Rm2T4-c\/s4880\/museum_assistant_upscaled.png?ssl=1\" style=\"margin-left: 1em; margin-right: 1em;\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" border=\"0\" data-original-height=\"4880\" data-original-width=\"2392\" height=\"640\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEj3pxeCVJfOo5G7McNB4RCIhoCUch8CHSAWI7gHijJJcE95b0gbu3lyAO1xIWc6mKllkpylSPBnVfU6RYnwfay4z6dH7TlufPuNw3Lw7s-bEuR4Ajx8IHK8k6zJcOHitqMRdDv8EVL-fCN6uuDo1QTnOgk_RW-AEM1_hZaJWbCGezMQF_D9Hia-Rm2T4-c\/w314-h640\/museum_assistant_upscaled.png?resize=314%2C640&#038;ssl=1\" width=\"314\"><\/a><\/div>\n<p>Museum assistant is a chatbot that answers questions, such as\u00a0<\/em><\/div>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><em style=\"text-align: left;\">\u2018How can I get a ticket discount for Le Louvre?\u2019<\/em><\/div>\n<p>When building AI features, getting the model to answer with fresh, accurate, and specific real-world information is a common challenge. While cloud models possess massive amounts of world knowledge, they might not know about seasonal exhibits or the current day\u2019s opening hours.\u00a0<\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEi8He5M2JC5EwXZwa-M52UAXHSO4dWy4gx3aZoY2ZXM-x25pV4kc6BsICe_fG4Zn6-R37_UgTQ8LBSsrNcP50e3aQLgxNbHOfWLBqzaSqQ78ZDmNEJadZNc-I5bduHr0UtWOxYMTFAHgffxcuzaETHPe3lvfRod2rkeOUXnRaLJ_vIiAfO_xRKpESbX3L8\/s8000\/grounding_upscaled.png?ssl=1\" style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\"><img data-recalc-dims=\"1\" decoding=\"async\" border=\"0\" data-original-height=\"4452\" data-original-width=\"8000\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEi8He5M2JC5EwXZwa-M52UAXHSO4dWy4gx3aZoY2ZXM-x25pV4kc6BsICe_fG4Zn6-R37_UgTQ8LBSsrNcP50e3aQLgxNbHOfWLBqzaSqQ78ZDmNEJadZNc-I5bduHr0UtWOxYMTFAHgffxcuzaETHPe3lvfRod2rkeOUXnRaLJ_vIiAfO_xRKpESbX3L8\/s1600\/grounding_upscaled.png?w=1280&#038;ssl=1\"><\/a><\/div>\n<p><em style=\"text-align: left;\"><br \/>Grounding data is added to the context window to enable the model<\/em><\/div>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><em style=\"text-align: left;\">\u00a0to answer questions correctly and accurately.<\/em><\/div>\n<p>To bridge this gap, we can use grounding techniques to add extra context to the model\u2019s context window. The <a href=\"https:\/\/firebase.google.com\/products\/firebase-ai-logic\" target=\"_blank\">Firebase AI Logic SDK<\/a> supports three types of grounding:<\/p>\n<ul>\n<li><strong><a href=\"https:\/\/firebase.google.com\/docs\/ai-logic\/url-context\">URL grounding<\/a>:<\/strong> Grounding responses using content from a specific webpage (e.g. current ticket prices or museum rules).<\/li>\n<li><strong><a href=\"https:\/\/firebase.google.com\/docs\/ai-logic\/grounding-google-search\">Google Search grounding<\/a>:<\/strong> Letting the model query the real-time Google search index for up-to-date details.<\/li>\n<li><strong><a href=\"https:\/\/firebase.google.com\/docs\/ai-logic\/grounding-google-maps\">Maps grounding<\/a>:<\/strong> Using Google Maps location data.<\/li>\n<\/ul>\n<p>In Jetpacker, we dynamically construct the available tools based on enabled feature flags and initialize the generative model using the Firebase AI SDK:<\/p>\n<pre><code>\/\/ implementation(\"com.google.firebase:firebase-ai-logic\")\n\nprivate var toolList = mutableListOf&lt;Tool&gt;()\n\ninit {\n    if (ENABLE_SEARCH_GROUNDING) {\n        toolList.add(Tool.googleSearch())\n    }\n    if (ENABLE_URL_GROUNDING) {\n        toolList.add(Tool.urlContext())\n    }\n}\n\nprivate val generativeModel = Firebase.ai(backend = GenerativeBackend.googleAI())\n    .generativeModel(\n        modelName = \"gemini-3-flash\",\n        systemInstruction = content {\n            text(\"You are a helpful museum assistant answering questions about a museum. Use plain text.\")\n        },\n        tools = toolList\n    )<\/code><\/pre>\n<p>When the user queries the assistant, if URL grounding is enabled, we append the specific museum resource URLs directly into the prompt:<\/p>\n<pre><code>val groundingText = if (FeatureFlags.ENABLE_URL_GROUNDING) {\n    \"n If the following message above is about the rules and terms to visit Le Louvre, \" +\n    \"if needed answer this urls ${urlList.joinToString()}\"\n} else {\n    \"\"\n}\n\nval prompt = \"$text $groundingText\"\n\nvar response = chat.sendMessage(prompt)\n<\/code><\/pre>\n<h2>Hybrid inference: On-device review generation with Maps deep link<\/h2>\n<p>Not every AI task requires a cloud-based model, and not every device is online. To help developers balance latency, cost, and offline availability, we recently introduced the <a href=\"https:\/\/firebase.google.com\/docs\/ai-logic\/hybrid\/android\/get-started?api=dev\">Firebase API for Hybrid Inference<\/a>.<\/p>\n<p>In Jetpacker, the <b>restaurant review<\/b> feature lets users review select topics and automatically drafts a review. To enable this for all users, we prioritize local execution with Gemini Nano, and fall back to cloud models on devices that don\u2019t support Gemini Nano.\u00a0<\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjVa1o2Zh3v3Babi7gGmzOFYAKPEgS0HWmvisiKgK-QsSRh_ZhjTjuUYSS_QIH0JQw9NsqrkYe4Quud6cfCGwVc61_7HKcACj6c9yywWySn5xyHGgemBR5tYPP8q3bmLadaN6uLXspE9LqrcZkVdckEGHWDhdfYVa-xo8QomDaRn03mau2fHVyK0Fr1FaU\/s4680\/review_upscaled.png?ssl=1\" style=\"margin-left: 1em; margin-right: 1em;\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" border=\"0\" data-original-height=\"4680\" data-original-width=\"2392\" height=\"640\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjVa1o2Zh3v3Babi7gGmzOFYAKPEgS0HWmvisiKgK-QsSRh_ZhjTjuUYSS_QIH0JQw9NsqrkYe4Quud6cfCGwVc61_7HKcACj6c9yywWySn5xyHGgemBR5tYPP8q3bmLadaN6uLXspE9LqrcZkVdckEGHWDhdfYVa-xo8QomDaRn03mau2fHVyK0Fr1FaU\/w327-h640\/review_upscaled.png?resize=327%2C640&#038;ssl=1\" width=\"327\"><\/a><\/div>\n<p><\/div>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><em>The restaurant review feature uses hybrid inference to draft a review based on topics<\/em><\/div>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><em><br \/><\/em><\/div>\n<pre><code>\/\/ implementation(\"com.google.firebase:firebase-ai-logic\")\n\/\/ implementation(\"com.google.firebase:firebase-ai-ondevice:16.0.0-beta03\")\n\n\n\/\/ Initialize the model with hybrid routing configuration\nval reviewModel = Firebase.ai.generativeModel(\n    modelName = \"gemini-3.1-flash-lite\",\n    onDeviceConfig = OnDeviceConfig(\n        inferenceMode = InferenceMode.PREFER_ON_DEVICE\n    )\n)<\/code><\/pre>\n<p>The Hybrid Inference API supports four distinct routing modes:<\/p>\n<ul>\n<li><strong>PREFER_ON_DEVICE:<\/strong> Prioritizes local execution and falls back to cloud if Gemini Nano is unavailable.<\/li>\n<li><strong>PREFER_IN_CLOUD:<\/strong> Prioritizes cloud execution and falls back to on-device if the device goes offline.<\/li>\n<li><strong>ONLY_ON_DEVICE:<\/strong> Restricts execution strictly to the device.<\/li>\n<li><strong>ONLY_IN_CLOUD:<\/strong> Restricts execution strictly to the cloud.<\/li>\n<\/ul>\n<p>Once the review is generated, we copy it to the clipboard and use an intent to open Google Maps directly to the restaurant&#8217;s review page, providing a seamless user experience:<\/p>\n<pre><code>private fun copyAndOpenMapsReview(context: Context, reviewText: String, placeId: String) {\n    val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager\n    val clip = ClipData.newPlainText(\"User Review\", reviewText)\n    clipboard.setPrimaryClip(clip)\n\n    val uri = Uri.parse(\"https:\/\/search.google.com\/local\/writereview\/mobile?placeid=$placeId\")\n    val intent = Intent(Intent.ACTION_VIEW, uri).apply {\n        setPackage(\"com.google.android.apps.maps\")\n    }\n    context.startActivity(intent)\n}<\/code><\/pre>\n<h2>Custom hybrid routing: Hotel support chat translation with simulated personas<\/h2>\n<p>The <b>hotel support chat<\/b> was built to let users finalize logistics and check on hotel details. This feature uses system instructions to configure a localized receptionist assistant. By passing specific information\u2014such as the preferred language and hotel information\u2014in the instructions, we can set up a conversational persona representing a specific hotel.<\/p>\n<pre><code>private val generativeModel = Firebase.ai(backend = GenerativeBackend.googleAI())\n    .generativeModel(\n        systemInstruction = content {\n            text(\"\"\"\n              You are a helpful hotel receptionist at $hotelName only speaking $language. \n              Answer politely in $language. The bar closes at 10pm and breakfast is from 7am to 10am.\n              There's someone at the desk 24\/7. You can retrieve your luggage from the storage room \n              at the back of the lobby at any time.\n              \"\"\")\n        },\n        modelName = \"gemini-3-flash-preview\"\n    )<\/code><\/pre>\n<p>Because receptionist responses are in the hotel&#8217;s local language (for example, French for Hotel Le Meurice in Paris), we need to translate messages to the user\u2019s preferred language.\u00a0<\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><em><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEikIB_NnUYK8GnEpI3foNLO2_AQ2lNZhoc9gFB-CjERDjMwrdQ2T45y6jzrJAafi4Jz7eF_SBkXG7csDwpajKctp5yo1hsBjIacIfK3aHvvQjCUu22qZBj7dLl5Q4aGFJRD4hwTlMMNgZD8sIuYpCrRjMmpa5ybXDzi9nkTMZoiJOEn8jLmqBsgTXcVTDY\/s4112\/translation_upscaled.png?ssl=1\" style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\"><img data-recalc-dims=\"1\" decoding=\"async\" border=\"0\" data-original-height=\"2364\" data-original-width=\"4112\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEikIB_NnUYK8GnEpI3foNLO2_AQ2lNZhoc9gFB-CjERDjMwrdQ2T45y6jzrJAafi4Jz7eF_SBkXG7csDwpajKctp5yo1hsBjIacIfK3aHvvQjCUu22qZBj7dLl5Q4aGFJRD4hwTlMMNgZD8sIuYpCrRjMmpa5ybXDzi9nkTMZoiJOEn8jLmqBsgTXcVTDY\/s1600\/translation_upscaled.png?w=1280&#038;ssl=1\"><\/a><\/div>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><em>Hotel support chat messages are automatically translated to the user\u2019s preferred language\u00a0<\/em><\/div>\n<p><\/em><\/div>\n<p>While hybrid models can configure simple routing preferences, complex scenarios require custom routing logic. In Jetpacker, we implement a custom routing stack that takes into account:<\/p>\n<ul>\n<li><strong>Language identification:<\/strong> Using the on-device <a href=\"https:\/\/developers.google.com\/ml-kit\/language\/identification\/android\">ML Kit Language Identification API<\/a>, we can detect the incoming message language.<\/li>\n<li><strong>On-device translation (Gemini Nano):<\/strong> <a href=\"https:\/\/developers.google.com\/ml-kit\/genai\/prompt\/android\">ML Kit\u2019s Prompt API<\/a> lets us translate common language pairs directly on the device, saving bandwidth and cloud cost.<\/li>\n<li><strong>Cloud translation (Gemini 3 Flash):<\/strong> For more complex languages, we use Gemini Flash 3 to get a higher quality translation.<\/li>\n<\/ul>\n<pre><code>\/\/ implementation(\"com.google.android.gms:play-services-mlkit-language-id:17.0.0\")\u00a0\n\n\/\/ ML Kit for Language Identification (powered by Google Play Services)\nprivate val languageIdentifier = LanguageIdentification.getClient()\n\n\/\/ On-device translator model (prefer Gemini Nano) for translating common language pairs\nprivate val hybridTranslationModel = Firebase.ai(backend = GenerativeBackend.googleAI())\n    .generativeModel(\n        modelName = \"gemini-3-flash\",\n        onDeviceConfig = OnDeviceConfig(mode = InferenceMode.PREFER_ON_DEVICE)\n    )\n\n\/\/ Cloud translator model for more complex language pairs\nprivate val cloudTranslationModel = Firebase.ai(backend = GenerativeBackend.googleAI())\n    .generativeModel(\n        modelName = \"gemini-3-flash\"\n    )<\/code><\/pre>\n<p>When a message needs to be translated, we identify the source language and apply our custom routing logic, executing either on-device or cloud translation:<\/p>\n<pre><code>fun translateMessage(message: SupportChatMessage) {\n    viewModelScope.launch {\n        \/\/ 1. Detect language using ML Kit Language Identification\n        val sourceLang = try {\n            Tasks.await(languageIdentifier.identifyLanguage(message.text))\n        } catch (e: Exception) {\n            \"Undefined\"\n        }\n\n        \/\/ 2. Custom routing: we've verified the translation quality for English and Korean with Gemini Nano, and will translate message on-device for those two languages\n        val routeToCloud = sourceLang != \"en\" &amp;&amp; sourceLang != \"kr\"\n\n        val prompt = \"Translate the following text to $selectedLanguage. Just return the translated sentence: ${message.text}.\"\n\n        val (translatedText, routePrefix) = if (routeToCloud) {\n            val result = cloudTranslationModel.generateContent(prompt)\n            result.text to \"[Cloud]\"\n        } else {\n            val result = hybridTranslationModel.generateContent(prompt)\n            result.text to \"[On-Device]\"\n        }\n\n        if (translatedText != null) {\n            _translations.update { current -&gt;\n                current + (message.id to \"$routePrefix: $translatedText\")\n            }\n        }\n    }\n}<\/code><\/pre>\n<p>In this example, the custom routing logic only takes into consideration the translation\u2019s source and target language. However, based on your app\u2019s use case, you can expand the routing logic to include other factors such as the on-device model version, network connectivity, battery status, and more.<\/p>\n<h2>Securing the AI Pipelines: Firebase App Check<\/h2>\n<p>Lastly, using AI in the cloud opens up possibilities of API key abuse or unauthorized billing. To secure API calls, we integrated <a href=\"https:\/\/firebase.google.com\/docs\/app-check\"><b>Firebase App Check<\/b><\/a> using both Play Integrity (production) and the local Debug Provider (for local development or emulators).<\/p>\n<p>In the <a href=\"https:\/\/github.com\/android\/ai-samples\/blob\/main\/jetpacker\/android\/app\/src\/main\/kotlin\/com\/example\/jetpacker\/JetPackerApplication.kt\">JetPackerApplication.kt<\/a> file, we install the debug provider at startup and trigger anonymous authentication to establish a secure user session:<\/p>\n<pre><code>\/\/  implementation(\"com.google.firebase:firebase-appcheck-playintegrity\")\u00a0\n\/\/  implementation(\"com.google.firebase:firebase-appcheck-debug\")\u00a0\u00a0\n\/\/  implementation(\"com.google.firebase:firebase-auth\")\u00a0\n\noverride fun onCreate() {\n    super.onCreate()\n    Firebase.initialize(context = this)\n    Firebase.appCheck.installAppCheckProviderFactory(\n        DebugAppCheckProviderFactory.getInstance()\n    )\n    Firebase.auth.signInAnonymously()\n}<\/code><\/pre>\n<p>When building locally on an emulator, App Check prints a local token secret to logcat:<\/p>\n<p>Enter this debug secret into the allow list in the Firebase Console: a8c2dd4c-xxxx-xxxx-xxxx-ef6c114ba27e<\/p>\n<p>Once registered in the Firebase console, local requests are fully verified and authenticated by App Check, protecting our backend while letting us test the app locally.<\/p>\n<h2>Conclusion<\/h2>\n<p>By 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.<\/p>\n<p>Check out the <a href=\"https:\/\/github.com\/android\/ai-samples\/tree\/main\/jetpacker\" target=\"_blank\">full source code for Jetpacker on GitHub<\/a>, and explore the Firebase documentation to get started:<\/p>\n<p><a href=\"https:\/\/firebase.google.com\/docs\/ai-logic\/get-started\">Firebase AI Logic Documentation<\/a><br \/><a href=\"https:\/\/firebase.google.com\/docs\/ai-logic\/hybrid\/android\/get-started\">Firebase Hybrid Inference API<\/a><\/p>\n<h2>Learn more<\/h2>\n<p>Check out the other parts of this blog post series:<\/p>\n<p><b><a href=\"http:\/\/android-developers.googleblog.com\/2026\/07\/build-intelligent-android-apps-introduction-jetpack.html\">Part 1<\/a>:<\/b> Introduction of the app and a high-level overview.<br \/><b><a href=\"http:\/\/android-developers.googleblog.com\/2026\/07\/android-on-device-inference.html\">Part 2<\/a>: <\/b>On-device intelligence. Deep-dive into ML Kit\u2019s GenAI APIs and Gemini Nano to build privacy-first features like itinerary summarization, receipt parsing, and local audio processing.<br \/><b><a href=\"http:\/\/android-developers.googleblog.com\/2026\/07\/build-intelligent-android-apps-cloud-hybrid-inference.html\">Part 3 (this post!):<\/a><\/b> Hybrid and cloud reasoning. Explore how to use Firebase AI Logic to ground LLM answers in real-world data like Google Maps and web context.<br \/><b><a href=\"http:\/\/android-developers.googleblog.com\/2026\/07\/build-intelligent-android-apps-appfunctions.html\">Part 4:<\/a> <\/b>System integration. Integrating with the Android intelligence system using AppFunctions.\u00a0<br \/><b>Part 5 (coming soon):<\/b> In-app agentic workflows. Extend the app with an end-to-end booking assistant powered by A2UI and ADK.<\/p>\n<p>Interested in more on Android Development? Follow Android Developers on <a href=\"https:\/\/www.youtube.com\/@AndroidDevelopers\">YouTube<\/a> or <a href=\"https:\/\/www.linkedin.com\/showcase\/androiddev\/\">LinkedIn<\/a>!<\/p>\n<p>All code snippets in this blog post follow the following copyright notice:<\/p>\n<pre><code>Copyright 2026 Google LLC.\nSPDX-License-Identifier: Apache-2.0<\/code><\/pre>\n<\/div>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_3594\" class=\"pvc_stats total_only  \" data-element-id=\"3594\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.0\" viewBox=\"0 0 502 315\" preserveAspectRatio=\"xMidYMid meet\"><g transform=\"translate(0,332) scale(0.1,-0.1)\" fill=\"\" stroke=\"none\"><path d=\"M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z\"\/><path d=\"M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z\"\/><path d=\"M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z\"\/><path d=\"M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z\"\/><path d=\"M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z\"\/><path d=\"M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z\"\/><path d=\"M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z\"\/><path d=\"M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z\"\/><path d=\"M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z\"\/><\/g><\/svg><\/i> <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/i0.wp.com\/dev95.site\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif?resize=16%2C16&#038;ssl=1\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Posted by Thomas Ezan, Jolanda Verhoef, Caren Chang, Senior Developer Relations Engineers, Android Developer Relations Welcome back to the blog post series &#8220;Build intelligent Android apps&#8221; where we take a basic Android app and transform it into a personalized, intelligent,<\/p>\n<div class=\"hosteria-entry-more\"><a href=\"https:\/\/dev95.site\/ar\/build-intelligent-android-apps-cloud-and-hybrid-inference\/\" class=\"no-underline font-light  group-hover:text-primary-800 dark:group-hover:text-primary-300 py-1\">Read more &gt;&gt;&gt;<\/a><\/div>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_3594\" class=\"pvc_stats total_only\" data-element-id=\"3594\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.0\" viewbox=\"0 0 502 315\" preserveaspectratio=\"xMidYMid meet\"><g transform=\"translate(0,332) scale(0.1,-0.1)\" fill=\"\" stroke=\"none\"><path d=\"M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z\"\/><path d=\"M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z\"\/><path d=\"M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z\"\/><path d=\"M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z\"\/><path d=\"M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z\"\/><path d=\"M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z\"\/><path d=\"M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z\"\/><path d=\"M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z\"\/><path d=\"M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z\"\/><\/g><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dev95.site\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=\"0\" \/><\/p>\n<div class=\"pvc_clear\"><\/div>","protected":false},"author":1,"featured_media":3595,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fp_fajr_begins":"","fp_fajr_iqamah":"","fp_dhuhr_begins":"","fp_dhuhr_iqamah":"","fp_asr_begins":"","fp_asr_iqamah":"","fp_maghrib_begins":"","fp_maghrib_iqamah":"","fp_isha_begins":"","fp_isha_iqamah":"","fp_midnight":"","fp_midnight_name":"","fp_sunrise":"","fp_single_prayer_begins_title":"","fp_single_prayer_iqamah_title":"","fp_prayer_times_for_today":"","fp_hijra_date":"","fp_fajr_name":"","fp_dhuhr_name":"","fp_asr_name":"","fp_maghrib_name":"","fp_isha_name":"","fp_sunrise_name":"","fp_currentDate":"","fp_current_time":"","fp_current_title":"","fp_current_location":"","fp_masjid_name":"","fp_prayer_title":"","fp_next_prayer_iqamah_time":"","fp_next_prayer_iqamah_title":"","fp_next_prayer_begins_time":"","fp_next_prayer_begins_title":"","fp_next_prayer_title":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[9],"tags":[],"class_list":["post-3594","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android"],"a3_pvc":{"activated":true,"total_views":0,"today_views":0},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Build intelligent Android apps: Cloud and hybrid inference - Dev95<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dev95.site\/ar\/build-intelligent-android-apps-cloud-and-hybrid-inference\/\" \/>\n<meta property=\"og:locale\" content=\"ar_AR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Build intelligent Android apps: Cloud and hybrid inference - Dev95\" \/>\n<meta property=\"og:description\" content=\"Posted by Thomas Ezan, Jolanda Verhoef, Caren Chang, Senior Developer Relations Engineers, Android Developer Relations Welcome back to the blog post series &#8220;Build intelligent Android apps&#8221; where we take a basic Android app and transform it into a personalized, intelligent,Read more &gt;&gt;&gt;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dev95.site\/ar\/build-intelligent-android-apps-cloud-and-hybrid-inference\/\" \/>\n<meta property=\"og:site_name\" content=\"Dev95\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-23T10:11:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhwlTUF1Kzkbrf2w64KO3jZJZZ_wLEu34vq6Cb7PX2alVUhFVdbkiWuXCkzUS-bPJkHMbmuNJ_Ov0HYZzujr69jCU9gPvmKaKMZt2q4-TolSDFCLABBIY1IBRY9Zn7D5S10hFcJD2kuVCm3N2glpqDJoHiqAZat4z6oyXxxwH4ZCGVBgfPObMevoJrgNPg\/s1600\/features_upscaled.png\" \/>\n<meta name=\"author\" content=\"dev95\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u0643\u064f\u062a\u0628 \u0628\u0648\u0627\u0633\u0637\u0629\" \/>\n\t<meta name=\"twitter:data1\" content=\"dev95\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u0648\u0642\u062a \u0627\u0644\u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0645\u064f\u0642\u062f\u0651\u0631\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 \u062f\u0642\u0627\u0626\u0642\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/dev95.site\\\/build-intelligent-android-apps-cloud-and-hybrid-inference\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dev95.site\\\/build-intelligent-android-apps-cloud-and-hybrid-inference\\\/\"},\"author\":{\"name\":\"dev95\",\"@id\":\"https:\\\/\\\/dev95.site\\\/#\\\/schema\\\/person\\\/b807805ffe2916206b04d0938bce0298\"},\"headline\":\"Build intelligent Android apps: Cloud and hybrid inference\",\"datePublished\":\"2026-09-23T10:11:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/dev95.site\\\/build-intelligent-android-apps-cloud-and-hybrid-inference\\\/\"},\"wordCount\":1234,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/dev95.site\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/dev95.site\\\/build-intelligent-android-apps-cloud-and-hybrid-inference\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/dev95.site\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/featuresinJetpackerFeatureswithFirebaseAILogic_Meta.png?fit=2469%2C1605&ssl=1\",\"articleSection\":[\"Android\"],\"inLanguage\":\"ar\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/dev95.site\\\/build-intelligent-android-apps-cloud-and-hybrid-inference\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/dev95.site\\\/build-intelligent-android-apps-cloud-and-hybrid-inference\\\/\",\"url\":\"https:\\\/\\\/dev95.site\\\/build-intelligent-android-apps-cloud-and-hybrid-inference\\\/\",\"name\":\"Build intelligent Android apps: Cloud and hybrid inference - Dev95\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dev95.site\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/dev95.site\\\/build-intelligent-android-apps-cloud-and-hybrid-inference\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/dev95.site\\\/build-intelligent-android-apps-cloud-and-hybrid-inference\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/dev95.site\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/featuresinJetpackerFeatureswithFirebaseAILogic_Meta.png?fit=2469%2C1605&ssl=1\",\"datePublished\":\"2026-09-23T10:11:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/dev95.site\\\/build-intelligent-android-apps-cloud-and-hybrid-inference\\\/#breadcrumb\"},\"inLanguage\":\"ar\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/dev95.site\\\/build-intelligent-android-apps-cloud-and-hybrid-inference\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ar\",\"@id\":\"https:\\\/\\\/dev95.site\\\/build-intelligent-android-apps-cloud-and-hybrid-inference\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/dev95.site\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/featuresinJetpackerFeatureswithFirebaseAILogic_Meta.png?fit=2469%2C1605&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/dev95.site\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/featuresinJetpackerFeatureswithFirebaseAILogic_Meta.png?fit=2469%2C1605&ssl=1\",\"width\":2469,\"height\":1605},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/dev95.site\\\/build-intelligent-android-apps-cloud-and-hybrid-inference\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/dev95.site\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Build intelligent Android apps: Cloud and hybrid inference\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/dev95.site\\\/#website\",\"url\":\"https:\\\/\\\/dev95.site\\\/\",\"name\":\"Dev95\",\"description\":\"A comprehensive platform for data and knowledge, delivering reliable content that meets the aspirations of readers and enthusiasts.\",\"publisher\":{\"@id\":\"https:\\\/\\\/dev95.site\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/dev95.site\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ar\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/dev95.site\\\/#organization\",\"name\":\"Dev95\",\"url\":\"https:\\\/\\\/dev95.site\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ar\",\"@id\":\"https:\\\/\\\/dev95.site\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/dev95.site\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/rbrrbr-6.png?fit=512%2C512&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/dev95.site\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/rbrrbr-6.png?fit=512%2C512&ssl=1\",\"width\":512,\"height\":512,\"caption\":\"Dev95\"},\"image\":{\"@id\":\"https:\\\/\\\/dev95.site\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/dev95.site\\\/#\\\/schema\\\/person\\\/b807805ffe2916206b04d0938bce0298\",\"name\":\"dev95\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ar\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a70a73d950838b20cd80d7ebdc955737e802e8cd896044c5473b32b946c0662a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a70a73d950838b20cd80d7ebdc955737e802e8cd896044c5473b32b946c0662a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a70a73d950838b20cd80d7ebdc955737e802e8cd896044c5473b32b946c0662a?s=96&d=mm&r=g\",\"caption\":\"dev95\"},\"url\":\"https:\\\/\\\/dev95.site\\\/ar\\\/author\\\/mohammad\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Build intelligent Android apps: Cloud and hybrid inference - Dev95","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dev95.site\/ar\/build-intelligent-android-apps-cloud-and-hybrid-inference\/","og_locale":"ar_AR","og_type":"article","og_title":"Build intelligent Android apps: Cloud and hybrid inference - Dev95","og_description":"Posted by Thomas Ezan, Jolanda Verhoef, Caren Chang, Senior Developer Relations Engineers, Android Developer Relations Welcome back to the blog post series &#8220;Build intelligent Android apps&#8221; where we take a basic Android app and transform it into a personalized, intelligent,Read more &gt;&gt;&gt;","og_url":"https:\/\/dev95.site\/ar\/build-intelligent-android-apps-cloud-and-hybrid-inference\/","og_site_name":"Dev95","article_published_time":"2026-09-23T10:11:58+00:00","og_image":[{"url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhwlTUF1Kzkbrf2w64KO3jZJZZ_wLEu34vq6Cb7PX2alVUhFVdbkiWuXCkzUS-bPJkHMbmuNJ_Ov0HYZzujr69jCU9gPvmKaKMZt2q4-TolSDFCLABBIY1IBRY9Zn7D5S10hFcJD2kuVCm3N2glpqDJoHiqAZat4z6oyXxxwH4ZCGVBgfPObMevoJrgNPg\/s1600\/features_upscaled.png","type":"","width":"","height":""}],"author":"dev95","twitter_card":"summary_large_image","twitter_misc":{"\u0643\u064f\u062a\u0628 \u0628\u0648\u0627\u0633\u0637\u0629":"dev95","\u0648\u0642\u062a \u0627\u0644\u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0645\u064f\u0642\u062f\u0651\u0631":"8 \u062f\u0642\u0627\u0626\u0642"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dev95.site\/build-intelligent-android-apps-cloud-and-hybrid-inference\/#article","isPartOf":{"@id":"https:\/\/dev95.site\/build-intelligent-android-apps-cloud-and-hybrid-inference\/"},"author":{"name":"dev95","@id":"https:\/\/dev95.site\/#\/schema\/person\/b807805ffe2916206b04d0938bce0298"},"headline":"Build intelligent Android apps: Cloud and hybrid inference","datePublished":"2026-09-23T10:11:58+00:00","mainEntityOfPage":{"@id":"https:\/\/dev95.site\/build-intelligent-android-apps-cloud-and-hybrid-inference\/"},"wordCount":1234,"commentCount":0,"publisher":{"@id":"https:\/\/dev95.site\/#organization"},"image":{"@id":"https:\/\/dev95.site\/build-intelligent-android-apps-cloud-and-hybrid-inference\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/dev95.site\/wp-content\/uploads\/2026\/09\/featuresinJetpackerFeatureswithFirebaseAILogic_Meta.png?fit=2469%2C1605&ssl=1","articleSection":["Android"],"inLanguage":"ar","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dev95.site\/build-intelligent-android-apps-cloud-and-hybrid-inference\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dev95.site\/build-intelligent-android-apps-cloud-and-hybrid-inference\/","url":"https:\/\/dev95.site\/build-intelligent-android-apps-cloud-and-hybrid-inference\/","name":"Build intelligent Android apps: Cloud and hybrid inference - Dev95","isPartOf":{"@id":"https:\/\/dev95.site\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dev95.site\/build-intelligent-android-apps-cloud-and-hybrid-inference\/#primaryimage"},"image":{"@id":"https:\/\/dev95.site\/build-intelligent-android-apps-cloud-and-hybrid-inference\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/dev95.site\/wp-content\/uploads\/2026\/09\/featuresinJetpackerFeatureswithFirebaseAILogic_Meta.png?fit=2469%2C1605&ssl=1","datePublished":"2026-09-23T10:11:58+00:00","breadcrumb":{"@id":"https:\/\/dev95.site\/build-intelligent-android-apps-cloud-and-hybrid-inference\/#breadcrumb"},"inLanguage":"ar","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dev95.site\/build-intelligent-android-apps-cloud-and-hybrid-inference\/"]}]},{"@type":"ImageObject","inLanguage":"ar","@id":"https:\/\/dev95.site\/build-intelligent-android-apps-cloud-and-hybrid-inference\/#primaryimage","url":"https:\/\/i0.wp.com\/dev95.site\/wp-content\/uploads\/2026\/09\/featuresinJetpackerFeatureswithFirebaseAILogic_Meta.png?fit=2469%2C1605&ssl=1","contentUrl":"https:\/\/i0.wp.com\/dev95.site\/wp-content\/uploads\/2026\/09\/featuresinJetpackerFeatureswithFirebaseAILogic_Meta.png?fit=2469%2C1605&ssl=1","width":2469,"height":1605},{"@type":"BreadcrumbList","@id":"https:\/\/dev95.site\/build-intelligent-android-apps-cloud-and-hybrid-inference\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dev95.site\/"},{"@type":"ListItem","position":2,"name":"Build intelligent Android apps: Cloud and hybrid inference"}]},{"@type":"WebSite","@id":"https:\/\/dev95.site\/#website","url":"https:\/\/dev95.site\/","name":"Dev95","description":"A comprehensive platform for data and knowledge, delivering reliable content that meets the aspirations of readers and enthusiasts.","publisher":{"@id":"https:\/\/dev95.site\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dev95.site\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ar"},{"@type":"Organization","@id":"https:\/\/dev95.site\/#organization","name":"Dev95","url":"https:\/\/dev95.site\/","logo":{"@type":"ImageObject","inLanguage":"ar","@id":"https:\/\/dev95.site\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/dev95.site\/wp-content\/uploads\/2026\/07\/rbrrbr-6.png?fit=512%2C512&ssl=1","contentUrl":"https:\/\/i0.wp.com\/dev95.site\/wp-content\/uploads\/2026\/07\/rbrrbr-6.png?fit=512%2C512&ssl=1","width":512,"height":512,"caption":"Dev95"},"image":{"@id":"https:\/\/dev95.site\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dev95.site\/#\/schema\/person\/b807805ffe2916206b04d0938bce0298","name":"dev95","image":{"@type":"ImageObject","inLanguage":"ar","@id":"https:\/\/secure.gravatar.com\/avatar\/a70a73d950838b20cd80d7ebdc955737e802e8cd896044c5473b32b946c0662a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a70a73d950838b20cd80d7ebdc955737e802e8cd896044c5473b32b946c0662a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a70a73d950838b20cd80d7ebdc955737e802e8cd896044c5473b32b946c0662a?s=96&d=mm&r=g","caption":"dev95"},"url":"https:\/\/dev95.site\/ar\/author\/mohammad\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/dev95.site\/wp-content\/uploads\/2026\/09\/featuresinJetpackerFeatureswithFirebaseAILogic_Meta.png?fit=2469%2C1605&ssl=1","_links":{"self":[{"href":"https:\/\/dev95.site\/ar\/wp-json\/wp\/v2\/posts\/3594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev95.site\/ar\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev95.site\/ar\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev95.site\/ar\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dev95.site\/ar\/wp-json\/wp\/v2\/comments?post=3594"}],"version-history":[{"count":0,"href":"https:\/\/dev95.site\/ar\/wp-json\/wp\/v2\/posts\/3594\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dev95.site\/ar\/wp-json\/wp\/v2\/media\/3595"}],"wp:attachment":[{"href":"https:\/\/dev95.site\/ar\/wp-json\/wp\/v2\/media?parent=3594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev95.site\/ar\/wp-json\/wp\/v2\/categories?post=3594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev95.site\/ar\/wp-json\/wp\/v2\/tags?post=3594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}