Generative AI on Android

This document gives an overview of generative AI on Android, including available Gemini models and associated SDKs.

Choose the generative AI solution that's right for you

High performance on-device AI

Gemini icon

On supported Android devices you can deliver rich generative AI experiences without needing a network connection or moving data off-device. On-device generative AI models such as Gemini Nano are great solutions for use-cases where low latency, low cost, and privacy safeguards are your primary concerns.

Use cases

  • AI-enhanced content consumption: text summarization, document question answering, and entity extraction.
  • AI-assisted content generation: proofreading, grammar correction, writing assistance, and contextual smart replies.
  • Classifying text: sentiment or mood analysis
  • Privacy: unlocks generative AI features while keeping data on-device

Solution

Use the Google AI Edge SDK to leverage Gemini Nano inference on-device. The SDK is in private preview, and we are testing it with early access partners before making it generally available.

Learn more about Gemini Nano

Multimodal Cloud AI with Google's most capable models

You can create multimodal generative AI experiences in your apps by taking advantage of foundation models running inference in the cloud like the Gemini Pro models. These models are a great solution when you want to support the widest possible range of Android devices.

Use cases

  • Image and video description and captioning: identifying objects and describing them in text
  • Multimodal reasoning: processing text, image, and video content
  • Text generation: summarize articles, answer questions about textual content, extract entities.
  • Response formatting: format the model response to JSON or Markdown

Solutions

For prototyping your generative AI features, we recommend starting with the Google AI client SDK, which gives you access to the Gemini API and helps to simplify your app's interactions with the Gemini models. The Google AI client SDK is in preview and recommended only for prototyping.

Learn more about the Google AI client SDK

For bringing your AI experiences into production, use Vertex AI for Firebase, which is available as a preview. Similar to the Google AI client SDK, this SDK provides access to Gemini models. In addition, Firebase includes production-level support across various mobile platforms.

Learn more about Vertex AI for Firebase

AI for Enterprises

Vertex AI icon

Vertex AI is Google's fully-managed, unified AI development platform for AI. Enterprises can use Google's Vertex AI platform to deliver customized AI experiences to Android devices using backend integrations. Build, train, and deploy AI applications on Google's scalable, world-class infrastructure. It's a great solution for enterprise-scale AI, with access to over 130 models and tools including AI Studio, Agent Builder, and Gemini models.

Use cases

  • Custom model training and delivery
  • Image and video generation
  • Virtual agents, customer support
  • Speech to text, natural language processing

Solution

Use Google's Vertex AI platform to build custom AI applications and connect Android apps to the service layer.

Learn more about Vertex AI

Additional resources

Gemini in Android Studio

Gemini in Android Studio is a coding companion for Android development. It's powered by artificial intelligence and can understand natural language. It helps you be more productive by answering your Android development queries. Gemini can help you find relevant resources, learn best practices, and save time.

Gemini API Starter template

The Gemini API Starter template closely follows the online quickstart for getting started with Gemini in Android. It leverages the Google AI client SDK for Android and shows how to work with text prompts and model responses.

Reference

Google APIs and SDKs for Gen AI on Android

Environment

API or SDK

Supported Model(s)

Availability

Recommended usage

Android integration with on-device inference

Google AI Edge SDK

Gemini Nano

Private preview

Recommended for production

Android integration with cloud inference

Google AI client SDK

Gemini 1.0 Pro

Gemini 1.0 Pro Vision
Gemini 1.5 Pro

Gemini 1.5 Flash

Public preview

Use only for prototyping

Vertex AI SDK for Firebase

Gemini 1.0 Pro

Gemini 1.0 Pro Vision
Gemini 1.5 Pro

Gemini 1.5 Flash

Public preview

Recommended for production upon stable release

Backend integration with cloud inference

Vertex AI platform

130+ foundation models (including Gemini Pro models)

Generally available

Recommended for production

Android integration with on-device inference

MediaPipe LLM inference

Gemma 2B
Falcon 1B
Stable LM 3B
Phi-2

Experimental

Google generative AI models

Google offers multiple generative AI models that you can use in your Android app.

Environment

Model

Type (Cost)

Supported input formats

Output data

On-device

Gemini Nano

Free

Text

Text

Cloud

Gemini 1.0 Pro

Free/Paid

Text

Text

Gemini 1.0 Pro Vision

Free/Paid

Text, image

Text

Gemini 1.5 Flash (Preview)

Free/Paid

Text, image

Text

Gemini 1.5 Pro (Preview)

Free/Paid

Text, image, video, audio

Text

On-device, cloud

Gemma

Free (Open model)

Text

Text

For complete details on each model's capabilities, including token and rate limits, see Gemini models.