64 lines
1.9 KiB
Markdown
64 lines
1.9 KiB
Markdown
# 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:
|
|
|
|
Example prompt:
|
|
```text
|
|
// 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
|
|
Example prompt:
|
|
```text
|
|
Refactor this repository to reduce duplication. Keep the public API the same and list tests to update.
|
|
```
|
|
|
|
## MCP For Android (High-Level)
|
|
MCP tools can automate Android tasks like builds, tests, and diagnostics. The exact tool depends on your team setup.
|
|
|
|
### What To Add Here
|
|
When you identify the approved Android MCP tool(s), add:
|
|
- Install steps
|
|
- VS Code configuration
|
|
- Example prompts
|
|
|
|
### Starter Prompts
|
|
Example prompts:
|
|
```text
|
|
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.
|