59 lines
2.0 KiB
Markdown
59 lines
2.0 KiB
Markdown
# Android AI Setup
|
||
|
||
You are here: [AI Docs Home](../index.md) > Android Setup
|
||
|
||
## Contents
|
||
- Setup
|
||
- Android-Specific Guidance
|
||
- MCP For Android
|
||
- Android Troubleshooting
|
||
- Next Steps
|
||
|
||
## Setup: VS Code + GitHub Copilot
|
||
Before starting, complete the [VS Code Initial Setup](../vscode-setup.md) for Copilot and Copilot Chat. This covers installing VS Code, GitHub Copilot, signing in, and verifying suggestions.
|
||
|
||
Once Copilot is working, continue below for Android-specific guidance.
|
||
|
||
## 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. Complete the [VS Code Initial Setup](../vscode-setup.md) first, then follow your team’s approved Android MCP tool instructions here.
|
||
|
||
### 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.
|
||
|
||
## Next Steps
|
||
- For workflow patterns, read [Cross-Platform AI Usage](../crossplatform/cross-platform.md).
|
||
- For safety rules, read [Governance, Privacy, and Policy](../governance.md).
|
||
- For cost guidance, read [Usage and Token Budgeting](../usage-tokens.md).
|