---
name: android-media
description: Operate Android media workflows with the media tool, including photo/video capture, media listing, audio recording/playback, and permission recovery. Use for camera, gallery, microphone, and playback tasks.
---

# Android Media

Use `media` for all media actions.

## Tool Map

- `action=capture_photo`
- `action=record_video`
- `action=list_recent`
- `action=audio_record` with `mode=start|stop|status`
- `action=audio_playback` with `mode=start|stop|status`
- `action=open_app_settings`

## Default Automation Policy

- Start with direct tool execution.
- Use `request_if_missing=true` and `open_settings_if_failed=true` for permission recovery.
- Keep `wait_user_confirmation=true` only for camera/system flows that require user completion.

## Capture Playbook

1. Launch `capture_photo` or `record_video`.
2. Wait for user to complete camera UI and return.
3. Verify output URI when available.
4. Return machine-readable output URI metadata.

## Audio Playbook

1. Start recording with `audio_record(mode="start")`.
2. Stop with `audio_record(mode="stop")`.
3. Replay with `audio_playback(mode="start", path="...")`.

## Common Calls

- `media(action="list_recent", kind="images", count=10, request_if_missing=true, open_settings_if_failed=true, wait_user_confirmation=true)`
- `media(action="capture_photo", wait_user_confirmation=true, check_output_after_confirm=true)`
- `media(action="audio_record", mode="start", filename="note.m4a")`

## Failure Recovery

- `permissions_missing`: run with permission recovery flags.
- `capture_not_found` or `record_not_found`: retake and ensure save is completed.
- `ui_unavailable`: keep app foreground and retry.

---
Source attribution: ModalityDance
Original project: https://github.com/ModalityDance/PalmClaw
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Gabriel Moreira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: ModalityDance
Original project: https://github.com/ModalityDance/PalmClaw
Attribution basis: Upstream repository explicitly recorded in package mirror path

Fields of work: Development & Engineering
Roles: Frontend Developer, Mobile Developer
Specialties: Mobile
Tools: Android Media
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 9867b4abae7868145c8f38fbcd14e98fd365d3fde4e9699ac762ef319c6ce69b
