How Androidify Leverages Gemini AI and Jetpack Compose to Build Custom Android Bots
Androidify lets users create personalized Android robot avatars by uploading selfies and using AI-powered image verification, description generation, and custom rendering, with the app built on Jetpack Compose, CameraX, Firebase AI Logic, Gemini, and ML Kit, available on both web and Google Play.
Androidify is a new application that enables users to build their own custom Android robot avatars using selfies and AI. The app is accessible via a web interface and a Google Play version.
Key Technology Integration
Androidify leverages the Firebase AI Logic SDK to access Google’s Gemini and Imagen models, which are essential for several core features.
Using Gemini and Firebase to Build AI
Image verification : The app first uses Gemini 2.5 Flash to validate the user’s photo, ensuring it is clear, well‑focused, and meets safety standards before further processing.
Add image description : After verification, Gemini generates a detailed JSON‑formatted description of the image, facilitating accurate and creative downstream rendering.
Android robot image generation : The description is fed into a fine‑tuned Imagen 3 model to produce a unique Android robot avatar that matches the app’s playful aesthetic.
Using Jetpack Compose and CameraX to Build UI
The UI is entirely built with Jetpack Compose, employing Material 3 Expressive design for attractive components, adaptive layouts via WindowSizeClass, shared‑element transitions, and automatic text‑size scaling.
CameraX is integrated with the ML Kit pose‑detection API, allowing the app to automatically enable the capture button when a person is in view and to adapt the camera experience across phones, tablets, and foldable devices.
Sticker Mode with ML Kit Subject Segmentation
The app includes a “Sticker Mode” that uses ML Kit’s subject‑segmentation library to remove the robot’s background, producing PNG stickers that can be used in other applications.
Generate Background Vibe with Gemini Image Editing
By employing the latest Gemini 2.5 Flash Image model, Androidify combines the robot avatar with a user‑specified background “vibe” prompt, creating a vivid scene‑integrated image.
override suspend fun generateImageWithEdit(
image: Bitmap,
backgroundPrompt: String = "Add the input image android bot as the main subject to the result... with the background that has the following vibe..."
): Bitmap {
val model = Firebase.ai(backend = GenerativeBackend.googleAI()).generativeModel(
modelName = "gemini-2.5-flash-image-preview",
generationConfig = generationConfig {
responseModalities = listOf(ResponseModality.TEXT, ResponseModality.IMAGE)
}
)
// Combine backgroundPrompt with input image
val prompt = content {
text(backgroundPrompt)
image(image)
}
val response = model.generateContent(prompt)
val image = response.candidates.firstOrNull()
?.content?.parts?.firstNotNullOfOrNull { it.asImageOrNull() }
return image ?: throw IllegalStateException("Could not extract image from model response")
}For the complete source code, see the LocalSegmentationDataSource file on GitHub. Try Androidify at androidify.com or download it from Google Play.
Sohu Tech Products
A knowledge-sharing platform for Sohu's technology products. As a leading Chinese internet brand with media, video, search, and gaming services and over 700 million users, Sohu continuously drives tech innovation and practice. We’ll share practical insights and tech news here.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
