Skip to content
Skillv1.0.0

android-media-files-sharing

Use modern Android file, media, picker, FileProvider, and share-sheet APIs with minimal permissions.

by krutikjain(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from krutikjain/android-agent-skills (skills/android-media-files-sharing/SKILL.md). Install upstream with npx skills add krutikjain/android-agent-skills --skill android-media-files-sharing. Copyright stays with the author.

Android Media Files Sharing

When To Use

  • Use this skill when the request is about: android file sharing, photo picker android app, fileprovider setup android.
  • Primary outcome: Use modern Android file, media, picker, FileProvider, and share-sheet APIs with minimal permissions.
  • Reach for this skill when the core problem is content URIs, share-sheet flows, picker choice, or app-to-app file exchange. Use android-permissions-activity-results only when the hard part is the runtime permission flow itself.
  • Handoff skills when the scope expands:
  • android-permissions-activity-results
  • android-security-best-practices

Workflow

  1. Start with the asset movement path: pick existing media, open a document, create/export a file, capture new content, or share app-owned content to another app.
  2. Choose the narrowest platform surface first: Photo Picker, SAF contracts, FileProvider, or chooser-based sharing before considering broad storage permissions.
  3. Keep file ownership and URI grants explicit with app-private storage, MIME types, temporary grants, and stable authorities.
  4. Validate return flows, absent-capability fallbacks, and recipient-app interoperability instead of testing only the happy path.
  5. Hand off runtime permission complexity or deeper hardening only after the URI and sharing contract is correct.

Guardrails

  • Prefer Photo Picker, SAF, and chooser APIs over broad media or storage permissions where possible.
  • Share content with content:// URIs and temporary grants, never raw file paths.
  • Keep exported authorities, MIME types, and cache cleanup explicit.
  • Treat recipients outside your app as untrusted; validate what leaves the app and what comes back.

Anti-Patterns

  • Requesting broad media or storage access when Photo Picker or SAF is enough.
  • Sharing file:// paths or world-readable files instead of FileProvider URIs.
  • Assuming every recipient app handles every MIME type or URI permission correctly.
  • Mixing permission-flow design with file-sharing contract design until both become unclear.

Review Focus

  • Picker/SAF/FileProvider/chooser selection.
  • MIME type, URI authority, and grant lifecycle correctness.
  • Minimal-permission media access.
  • Recipient-app interoperability and cleanup of temporary files.

Examples

Happy path

  • Scenario: Attach and share a task snapshot using the least-privilege API.
  • Command: cd examples/orbittasks-compose && ./gradlew :app:testDebugUnitTest

Edge case

  • Scenario: Handle absent picker support or denied media capabilities in the XML fixture.
  • Command: cd examples/orbittasks-xml && ./gradlew :app:testDebugUnitTest

Failure recovery

  • Scenario: Separate media/file flows from permission-only or networking-only requests.
  • Command: python3 scripts/eval_triggers.py --skill android-media-files-sharing

Done Checklist

  • The platform surface is narrower than a broad storage permission where possible.
  • URI authorities, MIME types, and temporary grants are explicit.
  • Picker and share-sheet fallbacks are covered.
  • Permission-only work is handed off instead of conflated with the sharing contract.

Official References

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/krutikjain-android-agent-skills-android-media-files-sharing/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

krutikjain-android-agent-skills-android-media-files-sharing.ocm.jsonjson
{
  "ocm": "1",
  "id": "krutikjain-android-agent-skills-android-media-files-sharing",
  "kind": "skill",
  "name": "android-media-files-sharing",
  "description": "Use modern Android file, media, picker, FileProvider, and share-sheet APIs with minimal permissions.",
  "publisher": "krutikjain",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "android",
      "media",
      "files",
      "sharing",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Use modern Android file, media, picker, FileProvider, and share-sheet APIs with minimal permissions."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/krutikjain/android-agent-skills",
      "path": "skills/android-media-files-sharing/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/krutikjain/android-agent-skills/blob/HEAD/skills/android-media-files-sharing/SKILL.md",
      "key": "krutikjain/android-agent-skills/skills/android-media-files-sharing/SKILL.md"
    }
  },
  "instructions": "# Android Media Files Sharing\n\n## When To Use\n- Use this skill when the request is about: android file sharing, photo picker android app, fileprovider setup android.\n- Primary outcome: Use modern Android file, media, picker, FileProvider, and share-sheet APIs with minimal permissions.\n- Reach for this skill when the core problem is content URIs, share-sheet flows, picker choice, or app-to-app file exchange. Use `android-permissions-activity-results` only when the hard part is the runtime permission flow itself.\n- Handoff skills when the scope expands:\n- `android-permissions-activity-results`\n-",
  "cost": {
    "context_tokens": 967
  }
}

Fetch it by URL: GET /api/v1/registry/krutikjain-android-agent-skills-android-media-files-sharing/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.