Posted by Thomas Ezan, Sr Developer Relation Engineer
With the appearance of Generative AI, Android builders now have entry to capabilities that had been beforehand out of attain. For example, now you can simply add picture captioning to your app with none laptop imaginative and prescient information.
With the upcoming launch of the secure model of VertexAI in Firebase in a couple of weeks (out there in Beta Since Google I/O), you can effortlessly incorporate the capabilities of Gemini 1.5 Flash and Gemini 1.5 Professional into your app. The inference runs on Google’s servers, making these capabilities accessible to any machine with an web connection.
A number of Android builders have already begun leveraging this know-how. Let’s discover a few of their creations.
Generate your meals for the week
The group behind Meal Planner, a meal planner and buying checklist administration app, is leveraging Gemini 1.5 Flash to create authentic meal plans. Based mostly on the person’s eating regimen, the variety of folks you’re cooking for and any meals allergic reactions or intolerances, the app routinely creates a meal plan for the chosen week.
For every dish, the mannequin lists substances and portions, making an allowance for the variety of parts. It additionally offers directions on the way to put together it. The app routinely generates a buying checklist for the week based mostly on the ingredient checklist for every meal.

To allow dependable processing of the mannequin’s response and to combine it within the app, the group leveraged Gemini’s JSON mode. They specified responseMimeType = “software/json” within the mannequin configuration and outlined the anticipated JSON response schema within the immediate (see API documentation).
Following the launch of the meal era function, Meal Planner acquired overwhelmingly optimistic suggestions. The function simplified meal planning for customers with dietary restrictions and helped cut back meals waste. Within the months after its introduction, Meal Planner skilled a 17% surge in premium customers.
Journaling whereas chatting with Leo
A couple of months in the past, the group behind the journal app Life wished to offer an modern method to let their customers log entries. They created “Leo”, an AI diary assistant chatting with customers and changing conversations right into a journal entry.
To change the conduct of the mannequin and the tone of its responses, the group used system directions to outline the chatbot persona. This permits the person to set the conduct and tone of the assistant: Decide “Skilled and formal” and the mannequin will maintain the dialog strict, choose “Pleasant and cheerful” and it’ll loosen up the dialogue with a number of emojis!

The group noticed a rise of person engagement following the launch of the function.
And if you wish to know extra about how the Life builders used Gemini API of their app, we had an amazing dialog with Jomin from the group. This dialog is a part of a brand new Android podcast collection known as Android Construct Time, you could additionally watch on YouTube.
Create a nickname on the fly
The HiiKER app offers offline climbing maps. The app additionally fosters a group by letting customers score trails and leaving feedback. However customers signing up don’t at all times add a username to their profile. To keep away from the danger of reducing the conversion charge by making username choice necessary at signup time, the group determined to make use of the Gemini API to counsel distinctive usernames based mostly on the person’s nation or space.

To generate authentic usernames, the group set a excessive temperature worth and performed with the top-Okay and top-P values to extend the creativity of the mannequin.
This AI-assisted function led to a major carry within the share of customers with “full” profiles contributing to a optimistic influence on engagement and retention.
It’s time to construct!
Generative AI continues to be a really new house and we’re simply beginning to have easy accessibility to those capabilities for Android. From enabling superior personalization, creating pleasant interactive experiences or simplifying signup, you may need distinctive challenges that you’re making an attempt to unravel as an Android app developer. It’s a nice time to start out these challenges as alternatives that generative AI might help you sort out!
You possibly can be taught extra in regards to the superior options of the Gemini Cloud fashions, discover an introduction to generative AI for Android builders, and get began with Vertex AI in Firebase documentation.
To be taught extra about AI on Android, try different sources we’ve out there throughout AI in Android Highlight Week.
Use #AndroidAI hashtag to share your creations or suggestions on social media, and be a part of us on the forefront of the AI revolution!