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. As an example, now you can simply add picture captioning to your app with none pc imaginative and prescient information.
With the upcoming launch of the steady 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 expertise. Let’s discover a few of their creations.
Generate your meals for the week
The staff behind Meal Planner, a meal planner and purchasing record administration app, is leveraging Gemini 1.5 Flash to create unique meal plans. Based mostly on the consumer’s food regimen, the variety of folks you’re cooking for and any meals allergic reactions or intolerances, the app mechanically creates a meal plan for the chosen week.
For every dish, the mannequin lists components and portions, making an allowance for the variety of parts. It additionally supplies directions on tips on how to put together it. The app mechanically generates a purchasing 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 staff leveraged Gemini’s JSON mode. They specified responseMimeType = “utility/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 characteristic, Meal Planner acquired overwhelmingly optimistic suggestions. The characteristic simplified meal planning for customers with dietary restrictions and helped scale 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 staff behind the journal app Life wished to offer an progressive strategy 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 staff used system directions to outline the chatbot persona. This enables the consumer 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 staff noticed a rise of consumer engagement following the launch of the characteristic.
And if you wish to know extra about how the Life builders used Gemini API of their app, we had an important dialog with Jomin from the staff. This dialog is a part of a brand new Android podcast collection known 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 score 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 reducing the conversion charge by making username choice necessary at signup time, the staff 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 staff 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 characteristic led to a major elevate within the proportion of customers with “full” profiles contributing to a optimistic influence on engagement and retention.
It’s time to construct!
Generative AI remains to be a really new area 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 might 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 will help you sort out!
You may 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 part of us on the forefront of the AI revolution!