CameraX Development Skill
Procedural guidance for Android camera development with CameraX, covering migration, recording lifecycles, and hardware interop.
Evidence shows the skill provides only guidance, no executable code or sensitive data handling; permissions are limited to basic Android camera perms. Dependencies are official Google libraries; no malicious or overreaching behavior found. However, no explicit user confirmation or data-flow transparency, publisher unverified, so deduct.
Instructions are logically self-consistent, provide clear code patterns and constraints, key paths (migration, capture) plausible. But static review cannot execute verification, no test coverage, limited error handling examples, so deduct.
Skill scenarios are clear, target Android developers, boundaries clear (CameraX etc.). But some dependencies on Google Play services may be unreachable in Mainland China, no Chinese support, limited evidence of environment fit.
Information architecture is good, several reference docs, clear license and last-updated. But no version history, changelog, or explicit maintenance responsibility; publisher unverified.
Skill can guide core tasks, but lacks actual output verification, value proposition not quantified, users need to adapt code themselves, limited evidence of marginal benefit.
No third-party execution evidence, such as CI tests or committed test suites; key claims lack independent verification, rely on author statements.
- Skill relies on Google Play services (e.g., LLB), which may be unreachable in Mainland China, affecting adaptability.
- Publisher unverified, provenance unclear; treat update and maintenance claims with caution.
- Static review cannot confirm completeness or correctness of code examples; test before real use.
- No user confirmation or data-flow transparency; when handling sensitive data like camera images, add your own safety measures.
What does this skill do, and when should you use it?
This skill offers step-by-step guidance and standard patterns for building camera apps on Android, with a focus on CameraX, including its Camera2Interop utilities and Media3 integrations. It covers immutable API patterns, migration guides from Camera1/Camera2 to CameraX, and blueprints for complex features such as manual controls, RAW capture, effects, low-light, foldables, XR, thermals, testing, ML Kit spatial analysis, and Wear OS. The skill emphasizes code quality practices like using fakes over mocks, Truth assertions, explicit test runners, and semantic UI merging. It also advises on hardware diversity and highlights common pitfalls like asynchronous lifecycles, thread safety, and permission handling.
Provides procedural guidance: code examples for immutable API patterns (e.g., reassigning VideoCapture pending instance); reference guides for Camera1-to-CameraX and Camera2-to-CameraX migration; structural blueprinting for multi-step features (manual controls, RAW capture, custom effects, etc.); recommendations for high-level abstractions (MlKitAnalyzer, Media3Effect, ConcurrentCamera); code quality standards (fakes over mocks, Truth assertions, explicit test runners, semantic merging); and a list of common pitfalls with mitigations.
- Android developers migrating legacy Camera1 or Camera2 codebases to CameraX for a simpler API and lifecycle handling
- Implementing camera features while avoiding common pitfalls like asynchronous recording state checks and thread-safe UI updates
- Building complex camera features (e.g., manual controls, RAW capture, custom effects) with a structured blueprint to avoid system timeouts
- Creating accessible camera controls in Compose that merge semantics for screen readers
- Developing camera apps for diverse hardware (foldables, multi-camera arrays) with consideration for device differences
What are this skill's strengths and limitations?
- Official Google maintenance ensures credibility
- Covers a wide range of scenarios from migration to advanced features
- Provides concrete, actionable code examples
- Clear guidance on common pitfalls
- Aligns with Android ecosystem best practices
- Focused solely on CameraX, not covering other camera APIs directly
- Requires access to `references/` directory for auxiliary documents not specified in the skill
- No mention of test coverage or verification methods
- Optimized for AI consumption, may be less detailed than official docs
How do you install this skill?
This skill is part of the Android skills repository. Install it using Android CLI: android skills add --skill=camerax --project=.; or install all skills with android skills add --all. If no agents are specified, skills go to ~/.gemini/antigravity/skills.
How do you use this skill?
After installation, in your agent session, describe a camera task such as "Help me migrate my Camera2 code to CameraX" or "Implement video recording with audio enabled." The skill will provide code patterns, migration guides, and blueprint references. Note that it references files in a references/ subdirectory; ensure those are available.