ai-docs/docs/ai/android.md
2026-02-10 14:24:09 -06:00

1.6 KiB

Android AI Setup

Setup: VS Code + GitHub Copilot Extension

Prerequisites

  • VS Code installed and up to date.
  • GitHub account with Copilot Enterprise access.

Install and Sign In (High-Level)

  1. Install the GitHub Copilot extension.
  2. Sign in with your GitHub account.
  3. Confirm Copilot is enabled in VS Code.
  4. Run a simple prompt to verify suggestions appear.

Example Prompt (VS Code)

Open a Kotlin file and add:

// Create a Kotlin data class for a user profile with name and email.

Verification Steps

  • Open a Kotlin file and start a small function.
  • Confirm inline suggestions appear.
  • Open Copilot Chat and ask a short question.

Android-Specific Guidance

  • Ask for Kotlin/Java patterns with small, bounded tasks.
  • Request unit tests for services and view models.
  • Prefer incremental changes over large rewrites.

Example Request

"Refactor this repository to reduce duplication. Keep the public API the same and list tests to update."

Starter Prompts

  • "Create a Kotlin data class and mapper for this API response."
  • "Write unit tests for this repository using JUnit."
  • "Refactor this file to reduce duplication without changing behavior."

Android Troubleshooting

  • If suggestions are missing, confirm sign-in and access.
  • If the extension is disabled, check extension settings.
  • If responses are blocked, check network or policy constraints.

Common Setup Gaps

  • Copilot access not provisioned for the GitHub account.
  • VS Code extension disabled after an update.
  • Multiple AI extensions competing for suggestions.