Posted by Dave Burke, VP of Engineering
Last week we unveiled our most capable base model, the Gemini. Gemini is multimodal – it can accept both text and image inputs. We’ve introduced a way for Android developers to use our smaller model, the Gemini Nano, on a device. This is available through AICore on select devices, simplifying work for developers by handling model management, runtime, security features and more. And today, we’re introducing new ways for Android developers to access the service. Gemini pro Model – Runs off-device, in Google’s data centers.
Application development with Gemini Pro
Gemini Pro is accessible through the Gemini API, and is our best model for benchmarking on a variety of text and image reasoning tasks. To simplify configuring Gemini Pro, you can use Google AI SDK, Client SDK for Android. This SDK enables direct integration with Android apps and eliminates the need for developers to build and manage their own backend infrastructure, reducing development costs and improving speed.
Google AI Studio provides a streamlined way for developers to integrate the Gemini Pro model, create artifacts, create API keys, and turn ideas into AI applications. After developing your question in Google AI Studio, simply click the “Get Code” step to generate a Kotlin code snippet and start integrating Gemini today using the Google AI SDK for Android.
We’re also making it easier for developers to use the Gemini API directly in the new Android Studio preview version. We’re introducing a new project template for developers to get started right away with the Google AI SDK for Android. Android Studio also benefits from improved code completion and lint resolvers, helping with API keys and security.
To use the new template in Android Studio, start a new project here File > New > New Project and select the Gemini API Launcher template. This template provides a preconfigured project with the necessary code to use the Gemini API. After choosing a project name and location, you will be prompted to generate an API key in Google AI Studio and import it in Android Studio. Android Studio automatically sets up the project for you with a Gemini API connection, simplifying your workflow.
Alternatively, you can import the Generative AI code sample and configure it in Android Studio. File > New > Import Sampleand searching for a “generative AI sample”.
Start building AI-powered features and Android apps using Gemini Pro.