Turn Your Selfie into an Android Bot: Inside the Open‑Source Androidify AI App

Androidify is an open‑source Android app that transforms user selfies into personalized Android robot avatars by combining Jetpack Compose UI, Firebase backend, and Google’s Gemini and Imagen AI models, offering developers a concrete example of AI‑driven mobile development.

AndroidPub
AndroidPub
AndroidPub
Turn Your Selfie into an Android Bot: Inside the Open‑Source Androidify AI App

Overview

Androidify is an open‑source Android sample that converts a user’s selfie into a stylized Android robot avatar using generative AI models. The full source code is hosted on GitHub for developers to explore and modify.

Technology Stack

Jetpack Compose UI

The UI is built entirely with Jetpack Compose and the Material 3 Expressive API. Key features include:

Animated gradient buttons, path‑offset robot motion, and shape‑morphing transitions between photo‑capture controls.

Custom components such as HorizontalToolbar and a nine‑sided Cookie9Sided shape that give the app a distinctive visual language.

Slot‑Pattern layouts that automatically adapt to phone, tablet, and dual‑screen configurations, reducing code duplication and simplifying UI maintenance.

Firebase AI Logic

Firebase provides the backend orchestration layer. The Firebase AI Logic SDK abstracts the network calls to Gemini and Imagen, so the app does not need a custom server. Developers only need to add the Firebase dependencies and configure the AI Logic service in the google-services.json file.

Gemini Multimodal Model

Gemini is used for two purposes:

Image verification : After a photo is captured or selected, the app sends the image together with a custom prompt to Gemini via Firebase AI Logic. Gemini returns a boolean indicating whether the image contains a person and whether it has sufficient detail for avatar generation.

Detailed description generation : If verification succeeds, Gemini produces a textual description of clothing, hair color, accessories, etc. The response can be requested in JSON format, e.g. {"hairColor":"brown","topColor":"blue","hasGlasses":true} which the front‑end parses to build the Imagen prompt.

Imagen Text‑to‑Image Model

Imagen receives the Gemini description as a prompt and generates one or more robot images. The app uses a fine‑tuned Imagen checkpoint (developers may replace it with the standard model). The first generated image is displayed by default, and additional candidates are available for user selection.

End‑to‑End Workflow

User input : The user selects or captures a selfie and chooses a robot color.

Verification & description : The app calls Firebase AI Logic → Gemini to (a) confirm the image contains a person and (b) obtain a structured description of visual attributes.

Prompt construction : The description is formatted into a natural‑language prompt, e.g. “Create an Android robot wearing a blue shirt, brown hair, and glasses.”

Image generation : The prompt is sent to Imagen via Firebase AI Logic, which returns one or more robot renderings.

Result display : The generated robot image(s) are shown in the Compose UI, completing the transformation.

Implementation Highlights for Developers

Seamless integration of Jetpack Compose, Firebase, Gemini, and Imagen demonstrates a clear architectural pattern for AI‑driven Android apps.

Material 3 Expressive API usage, multi‑screen adaptation, and custom animation techniques can be reused in other projects.

The repository includes detailed documentation, sample code for invoking Gemini and Imagen, and Gradle scripts for setting up Firebase AI Logic.

Source Code

Complete source code and build instructions are available at the following URL (GitHub): https://github.com/google/androidify (short link: http://goo.gle/androidify-code)

Androidify: Turning selfies into a cute Android bot with AI - YouTube
Androidify: Turning selfies into a cute Android bot with AI - YouTube
Jetpack Compose animation examples
Jetpack Compose animation examples
Gemini model diagram
Gemini model diagram
Imagen model illustration
Imagen model illustration
GeminiJetpack Composefirebaseimagen
AndroidPub
Written by

AndroidPub

Senior Android Developer & Interviewer, regularly sharing original tech articles, learning resources, and practical interview guides. Welcome to follow and contribute!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.