Posted by Thomas Ezan, Sr Developer Relation Engineer
With the arrival 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 data.
With the upcoming launch of the secure model of VertexAI in Firebase in just a few weeks (out there in Beta Since Google I/O), you’ll 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 workforce behind Meal Planner, a meal planner and buying record administration app, is leveraging Gemini 1.5 Flash to create unique meal plans. Primarily based on the consumer’s weight loss program, the variety of folks you’re cooking for and any meals allergy symptoms or intolerances, the app mechanically creates a meal plan for the chosen week.
For every dish, the mannequin lists elements and portions, considering the variety of parts. It additionally supplies directions on put together it. The app mechanically generates a buying record for the week based mostly on the ingredient record for every meal.
To allow dependable processing of the mannequin’s response and to combine it within the app, the workforce 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 technology function, Meal Planner obtained overwhelmingly constructive 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 number of months in the past, the workforce behind the journal app Life wished to offer an modern solution 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 switch the conduct of the mannequin and the tone of its responses, the workforce used system directions to outline the chatbot persona. This permits the consumer to set the conduct and tone of the assistant: Choose “Skilled and formal” and the mannequin will hold the dialog strict, choose “Pleasant and cheerful” and it’ll loosen up the dialogue with numerous emojis!
The workforce noticed a rise of consumer 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 excellent dialog with Jomin from the workforce. This dialog is a part of a brand new Android podcast collection referred to as Android Construct Time, you can additionally watch on YouTube.
Create a nickname on the fly
The HiiKER app supplies offline mountain climbing maps. The app additionally fosters a group by letting customers ranking trails and leaving feedback. However customers signing up don’t all the time add a username to their profile. To keep away from the chance of decreasing the conversion fee by making username choice obligatory at signup time, the workforce determined to make use of the Gemini API to counsel distinctive usernames based mostly on the consumer’s nation or space.
To generate unique usernames, the workforce set a excessive temperature worth and performed with the top-Ok and top-P values to extend the creativity of the mannequin.
This AI-assisted function led to a major raise within the share of customers with “full” profiles contributing to a constructive impression on engagement and retention.
It’s time to construct!
Generative AI remains to be a really new house and we’re simply beginning to have quick access to those capabilities for Android. From enabling superior personalization, creating pleasant interactive experiences or simplifying signup, you may need distinctive challenges that you’re attempting to unravel as an Android app developer. It’s a nice time to start out taking a look at these challenges as alternatives that generative AI may help you deal with!
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 assets we now have 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!