Index of every page on this site: llms.txt
All skills
android avatar

/camerax

@7f7b217
by androidandroid/skills11k stars
703
Run it yourself

Provide technical guidance for Android camera development with CameraX. Use when implementing camera features, handling asynchronous recording lifecycles, wiring low-level hardware interop using CameraX, or integrating ML Kit or Media3 effects.

Use this Skill: https://skilld.dev/gh/android/skills/camerax

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesexpert-blueprints.md

≈550 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Complex camera features often fail due to "Agent Stall" or timeouts when attempted in a single turn. Use these blueprints to break tasks into manageable phases.

Manual controls

Phase one: ViewModel and state

  1. Define a ManualSettings data class.
  2. Add a MutableStateFlow<ManualSettings> to your CameraViewModel.
  3. Implement the Jetpack Compose UI with sliders and switches to update this flow.

Phase two: Controller wiring

  1. In CameraController.kt, create a new function updateManualSettings(settings: ManualSettings).
  2. Map these settings into the CameraSystem layer.

Phase three: CameraX Camera2Interop wiring

  1. In CameraSession.kt, use the Camera2Interop.Extender utility to access Camera2 capture request keys.
  2. Apply the hardware keys:
    • CaptureRequest.SENSOR_SENSITIVITY to set ISO sensitivity.
    • CaptureRequest.SENSOR_EXPOSURE_TIME to set exposure time.
    • CaptureRequest.LENS_FOCUS_DISTANCE to set focus distance.
  3. Critical : If manual exposure is active, set CaptureRequest.CONTROL_AE_MODE to CameraMetadata.CONTROL_AE_MODE_OFF. ---

RAW and JPEG capture

Phase one: Output configuration

  1. Verify device support for RAW capture using CameraInfo.
  2. Configure ImageCapture.Builder with OUTPUT_FORMAT_RAW_JPEG or OUTPUT_FORMAT_RAW.

Phase two: Implementation

  1. Provide ImageCapture.OutputFileOptions for the target storage locations.
  2. Invoke takePicture. CameraX internally manages DngCreator to wrap RAW data with the required CameraCharacteristics and CaptureResult metadata.

Apply image effects

Phase one: Effects selection

  1. Use the androidx.media3:media3-effect dependency.
  2. Use RgbFilter or HslAdjustment for standard color grading.

Phase two: Application

  1. Configure Composition.Builder or MediaItem.Builder with the list of effects.
  2. Inject the list of effects into the CameraX Recorder or Preview using the setEffects method.

Low-light capture

For guidance on Night Mode Extensions and Low Light Boost, low-light.md.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts6d3 checks · Risk SAFE
  • Gen Agent Trust Hub7d

    The skill provides technical guidance for Android CameraX development, covering migration from legacy APIs, handling device diversity (foldables, Wear OS, XR), and integrating with ML Kit and Media3. No security issues were detected; all code snippets and external references originate from trusted sources and follow standard platform patterns.

  • Socket6d

    No alerts

  • Snyk7d

    Risk: LOW · No issues

Signed by skilld at 7f7b217. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 1 hour ago.

Activeupdated last week
Other metadata
metadata
{
  "author": "Google LLC",
  "last-updated": "2026-11-10",
  "keywords": [
    "recipe",
    "Android",
    "Camera",
    "Camera1",
    "Camera2",
    "CameraX",
    "migration",
    "Compose",
    "guide",
    "dependencies",
    "PreviewView",
    "CameraXViewfinder",
    "ImageCapture",
    "VideoCapture",
    "ImageAnalysis."
  ]
}

README badge

README badge for android/skills/camerax