Chat with Gemini

The main interface for interacting with Gemini is the chat window. You can use it to ask questions ranging from very simple and open-ended ones to specific problems that you need help with.

Here are some examples of things you might ask; however, we encourage you to experiment with any topics related to Android development:

  • How do I add camera support to my app?
  • I want to create a Room database.
  • Can you remind me of the format for Javadocs?
  • What is dark theme?
  • What's the best way to get location on Android?

Gemini remembers the context of the conversation, so you can also ask it follow-up questions, such as:

  • Can you give me the code for this in Kotlin?
  • Can you show me how to do it in Compose?

Gemini in Android Studio is uniquely equipped to answers questions about a specific capability or workflow in the Studio IDE, for example:

  • How do I analyze jank in my app?
  • Where do I find the CPU profiler?

Show query history

Your queries to Gemini in Android Studio are saved for every coding session in Android Studio. To see your previous queries, click Show Query History in the Gemini chat box. A menu appears with all the queries you've submitted in this coding session.

To re-submit a previous query, click the query to paste it in the chat box and click Submit.

When you quit Android Studio, the query history is cleared. To save and manage commonly used prompts across coding sessions, use the Prompt Library.

Clear conversation history

Gemini remembers your previous chats and is able to use them as context for your conversation. If your chat history is no longer relevant to what you're currently trying to achieve, reset the chat history by clicking Clear Conversation History in the Gemini pane.

Next steps