skip to Main Content

As it is known, Android Studio also added gemini support. Can I add a block to gemini to prevent it from analysing my source code?

3

Answers


  1. Chosen as BEST ANSWER

    When I examine the Android Studio settings, there is an option like below. Blocking can be provided with this option.

    How to protect my source code from gemini in Android Studio


  2. From the Data & Privacy Policy of the Gemini documentation:

    Your code isn’t shared with Gemini without your explicit consent. You have the option to share your code with Gemini in order to enable context awareness features, providing Gemini with the ability to offer project-specific responses.

    That said, other information may be sent even if you decline sharing your code. From the same page:

    • Usage statistics: Data specifying how you use Android Studio and its related tools, such as how you use features and resource usage. This includes software identifiers internal to Studio such as package names, class names, and plugin configuration. You can enable or disable this sharing from File (Android Studio on macOS) > Settings > Appearance & Behavior > Data Sharing.
    • Prompts and responses: The questions that you ask Gemini, including any input information or code that you submit to Gemini to analyze or complete, are called prompts. The answers or code completions that you receive from Gemini are called responses.
    • Feedback signals: Thumbs up and down votes and any other feedback that you provide.
    • Context (optional): Gemini might send additional information from your codebase such as pieces of your code, file types, and any other information that might be necessary to provide context to the Large language Model (LLM). This helps Gemini provide higher quality and relevant responses. This also lets Gemini provide additional experimental capabilities such as AI code completion.
    Login or Signup to reply.
  3. The easiest way is creating .aiexclude in project root. Detail syntax can be found here:
    https://developer.android.com/studio/preview/gemini/aiexclude

    An empty .aiexclude file blocks all files in its directory and all sub-directories.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search