Google is bringing Gemini to more of its products, with Android Studio now the latest on the list.
Highlights:
- Google renames its AI coding assistant Studio Bot to ‘Gemini in Android Studio’
- Brings several features such as asking queries related to Android Programming and using Gemini API to create generative AI applications.
- Currently released in preview mode in the Android Studio Jellyfish version.
Gemini in Android Studio Explained
Google announced they will use the Gemini 1.0 Pro model to make Android development much faster and easier. The Studio Bot will now be called ‘Gemini in Android Studio’.
“Today we’re excited to announce that Android Studio is using the Gemini 1.0 Pro model to make Android development faster and easier, and we’ve seen significant improvements in response quality over the last several months through our internal testing.”
Gemini in Android Studio will be the new name for the AI app development assistant available in the Android Studio IDE.
Without required to leave Android Studio, it can assist developers create code for your applications, offering complicated code completions, responding to your inquiries, adding code comments, and much more to help you create high-quality Android apps more quickly.
For the Jellyfish edition of Android Studio, the company is launching it in more than 180 countries.
It’s been almost two weeks since Gemini 1.5 Pro’s model was made publicly available through the Google AI Studio. But today they are looking to offer the powerful chatbot to a much wider audience through the Android Studio Application to improve coding features for Android developers.
Google has been testing with Gemini in Android Studio for the last several months. They have seen several improvements in response and query processing times after they implemented their AI models in their internal testing. This just gives us an idea of how efficient Gemini can be when introduced to the Android development platform.
How to Access It?
Gemini in Android Studio is in preview mode. It is being rolled out in more than 180 countries in the Android Studio Jellyfish version of the application.
Here’s how Android Developers can access it:
- Download Android Studio Jellyfish or a more recent version.
- (Optional) Accept sending data to Google so they can learn more about the efficacy of Gemini. After installing Android Studio, go to File > Settings > Appearance & Behaviour > System Settings > Data Sharing (Android Studio > Settings > Appearance & Behaviour > System Settings > Data Sharing on macOS) and grant permission to share data.
- Open or begin an Android Studio project, then select View > Tool Windows > Gemini to open it.
- When prompted, log into the Google account.
- Use Gemini’s conversational, interactive interface once the chat window displays.
Congratulations! Now enjoy its Android development capabilities. The Jellyfish model has been trained with several improvements, so developers go ahead and try the tool in the preview mode and give a review before the tool is released to stable.
What’s Changing for Android Developers?
For Android programming, Gemini in Android Studio is the new ‘coding buddy for developers. This will improve productivity on a whole new level.
With Android Studio, Gemini offers robust AI code completions, and provides recommendations for multi-line code completions, code commenting techniques, and documentation additions.
Let’s look at the key features it has to offer:
1) Ask anything about Android Programming
Gemini in Android Studio can comprehend natural language, allowing developers to ask questions about code development. They can ask any kind of inquiry in the chat window, from general inquiries to more focused issues that require assistance.
It can be used to ask questions about anything from particular issues that you require assistance with to extremely basic, open-ended inquiries. Here are some samples of questions you might have, but don’t hesitate to try with any other Android development-related subjects:
- How do I add camera support to my app?
- Using Compose, I need a login screen with the following: a username field, a password field, a ‘Sign In’ button, ‘Forgot Password?’ link. I want the password field to obscure the input.
- What’s the best way to get the location on Android?
- I have an ‘orders’ table with columns like ‘order_id’, ‘customer_id’, ‘product_id’, ‘price’, and ‘order_date’. Can you help me write a query that calculates the average order value per customer over the last month?
Gemini in Android Studio will do its best to fetch the required information from its knowledge base so that you get the desired results. The application retains the conversation’s context, allowing you to ask follow-up questions like “Could you please provide the code for this in Kotlin?” or “Could you walk me through the process in Compose?”
2) Gemini API to create a Gen AI application
Not only can Android Studio leverage Gemini to increase productivity, but it can also assist in utilizing the models to build AI-powered features into your applications.
With the Gemini API starting template, which can be found under File > New Project > Gemini API starting in Android Studio’s canary release channel, you can get started quickly. The code sample found under File > Import Sample > Google Generative AI sample is another option for you to utilize.
Since the Gemini API is multimodal, both text and image inputs are supported. Using both text and image inputs, Android Studio can facilitate conversational discussion, summarization, translation, caption creation, etc.
This is what Gemini can do when integrated with an application like Android Studio. Leverages in the form of multimodal capabilities and starter templates for Gen AI applications are just a few of the benefits.
Deploying and developing applications has been a bit complex with Gemini but it is easier than anything when in collaboration with Android Studio.
Safety and Privacy Concerns
Privacy is something that Google has taken care of! Gemini is Android Studio and is only accessible when the developer logs in and enables it. Most features are not required to send the code context to use them.
Developers have the option to share more context for personalized responses. This can be changed at any moment at the project level in Android Studio > Settings.
The developer can also choose to exclude specific files and folders from Android Studio by using a .aiexclude file.
The files that are shared with the backend servers are restricted by .aiexclude files. An array of patterns makes up a.aiexclude file, much like a.gitignore file does. The AI models never utilize files or directories that match the patterns in the.aiexclude files as context.
AI functionalities within the editor, such as code completion and intention actions, are likewise deactivated in files protected by.aiexclude rules.
This is a huge benefit as now Android Studio gives access to .aiexclude files which in turn safeguards your data shared with Android Studio.
There are many more ways Developers can use Google’s AI models, try these amazing Gemini 1.5 Pro features.
Conclusion
Integrating Gemini in Android Studio is a huge step by Google towards improving Android Development using AI. A much wider variety of audience composed of Android developers will be able to get exposure to new AI capabilities and this will help them to deploy highly efficient mobile applications.