{"id":"49d67d6d-5159-4a88-9b65-4d6b756e9c13","shortId":"AhDSa8","kind":"skill","title":"android-media-files-sharing","tagline":"Use modern Android file, media, picker, FileProvider, and share-sheet APIs with minimal permissions.","description":"# 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- `android-security-best-practices`\n\n## Workflow\n1. 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.\n2. Choose the narrowest platform surface first: Photo Picker, SAF contracts, `FileProvider`, or chooser-based sharing before considering broad storage permissions.\n3. Keep file ownership and URI grants explicit with app-private storage, MIME types, temporary grants, and stable authorities.\n4. Validate return flows, absent-capability fallbacks, and recipient-app interoperability instead of testing only the happy path.\n5. Hand off runtime permission complexity or deeper hardening only after the URI and sharing contract is correct.\n\n## Guardrails\n- Prefer Photo Picker, SAF, and chooser APIs over broad media or storage permissions where possible.\n- Share content with `content://` URIs and temporary grants, never raw file paths.\n- Keep exported authorities, MIME types, and cache cleanup explicit.\n- Treat recipients outside your app as untrusted; validate what leaves the app and what comes back.\n\n## Anti-Patterns\n- Requesting broad media or storage access when Photo Picker or SAF is enough.\n- Sharing `file://` paths or world-readable files instead of `FileProvider` URIs.\n- Assuming every recipient app handles every MIME type or URI permission correctly.\n- Mixing permission-flow design with file-sharing contract design until both become unclear.\n\n## Review Focus\n- Picker/SAF/FileProvider/chooser selection.\n- MIME type, URI authority, and grant lifecycle correctness.\n- Minimal-permission media access.\n- Recipient-app interoperability and cleanup of temporary files.\n\n## Examples\n### Happy path\n- Scenario: Attach and share a task snapshot using the least-privilege API.\n- Command: `cd examples/orbittasks-compose && ./gradlew :app:testDebugUnitTest`\n\n### Edge case\n- Scenario: Handle absent picker support or denied media capabilities in the XML fixture.\n- Command: `cd examples/orbittasks-xml && ./gradlew :app:testDebugUnitTest`\n\n### Failure recovery\n- Scenario: Separate media/file flows from permission-only or networking-only requests.\n- Command: `python3 scripts/eval_triggers.py --skill android-media-files-sharing`\n\n## Done Checklist\n- The platform surface is narrower than a broad storage permission where possible.\n- URI authorities, MIME types, and temporary grants are explicit.\n- Picker and share-sheet fallbacks are covered.\n- Permission-only work is handed off instead of conflated with the sharing contract.\n\n## Official References\n- [https://developer.android.com/training/data-storage/shared/photopicker](https://developer.android.com/training/data-storage/shared/photopicker)\n- [https://developer.android.com/training/data-storage/shared/documents-files](https://developer.android.com/training/data-storage/shared/documents-files)\n- [https://developer.android.com/training/secure-file-sharing/setup-sharing](https://developer.android.com/training/secure-file-sharing/setup-sharing)\n- [https://developer.android.com/training/sharing/send](https://developer.android.com/training/sharing/send)\n- [https://developer.android.com/topic/performance/graphics/picker](https://developer.android.com/topic/performance/graphics/picker)","tags":["android","media","files","sharing","agent","skills","krutikjain","agent-skills","android-development","android-skills","androidx","claude-code"],"capabilities":["skill","source-krutikjain","skill-android-media-files-sharing","topic-agent-skills","topic-android","topic-android-development","topic-android-skills","topic-androidx","topic-claude-code","topic-codex","topic-cursor","topic-jetpack-compose","topic-kotlin","topic-skills"],"categories":["android-agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/krutikJain/android-agent-skills/android-media-files-sharing","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add krutikJain/android-agent-skills","source_repo":"https://github.com/krutikJain/android-agent-skills","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (3,869 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:13:27.916Z","embedding":null,"createdAt":"2026-05-18T13:20:50.391Z","updatedAt":"2026-05-18T19:13:27.916Z","lastSeenAt":"2026-05-18T19:13:27.916Z","tsv":"'/gradlew':380,401 '/topic/performance/graphics/picker](https://developer.android.com/topic/performance/graphics/picker)':489 '/training/data-storage/shared/documents-files](https://developer.android.com/training/data-storage/shared/documents-files)':480 '/training/data-storage/shared/photopicker](https://developer.android.com/training/data-storage/shared/photopicker)':477 '/training/secure-file-sharing/setup-sharing](https://developer.android.com/training/secure-file-sharing/setup-sharing)':483 '/training/sharing/send](https://developer.android.com/training/sharing/send)':486 '1':121 '2':149 '3':171 '4':191 '5':211 'absent':196,387 'absent-cap':195 'access':289,351 'activ':91,113 'android':2,8,21,36,41,45,50,89,111,116,424 'android-media-files-shar':1,423 'android-permissions-activity-result':88,110 'android-security-best-practic':115 'anoth':147 'anti':282 'anti-pattern':281 'api':17,59,236,376 'app':42,82,84,143,148,181,202,269,276,311,354,381,402 'app-own':142 'app-priv':180 'app-to-app':81 'asset':125 'assum':308 'attach':365 'author':190,258,342,443 'back':280 'base':164 'becom':333 'best':118 'broad':168,238,285,437 'cach':262 'capabl':197,393 'captur':137 'case':384 'cd':378,399 'checklist':429 'choic':79 'choos':150 'chooser':163,235 'chooser-bas':162 'cleanup':263,357 'come':279 'command':377,398,419 'complex':216 'conflat':468 'consid':167 'content':72,139,145,246 'contract':159,226,329,472 'core':69 'correct':228,319,346 'cover':458 'create/export':134 'deeper':218 'deni':391 'design':324,330 'developer.android.com':476,479,482,485,488 'developer.android.com/topic/performance/graphics/picker](https://developer.android.com/topic/performance/graphics/picker)':487 'developer.android.com/training/data-storage/shared/documents-files](https://developer.android.com/training/data-storage/shared/documents-files)':478 'developer.android.com/training/data-storage/shared/photopicker](https://developer.android.com/training/data-storage/shared/photopicker)':475 'developer.android.com/training/secure-file-sharing/setup-sharing](https://developer.android.com/training/secure-file-sharing/setup-sharing)':481 'developer.android.com/training/sharing/send](https://developer.android.com/training/sharing/send)':484 'document':133 'done':428 'edg':383 'enough':296 'everi':309,313 'exampl':361 'examples/orbittasks-compose':379 'examples/orbittasks-xml':400 'exchang':86 'exist':129 'expand':109 'explicit':178,264,450 'export':257 'failur':404 'fallback':198,456 'file':4,9,23,37,51,85,136,173,254,303,327,360,426 'file-shar':326 'fileprovid':12,43,54,160,306 'first':155 'fixtur':397 'flow':77,102,194,323,409 'focus':336 'grant':177,187,251,344,448 'guardrail':229 'hand':212,464 'handl':312,386 'handoff':104 'happi':209,362 'hard':96 'harden':219 'instead':204,304,466 'interoper':203,355 'keep':172,256 'least':374 'least-privileg':373 'leav':274 'lifecycl':345 'media':3,10,22,52,130,239,286,350,392,425 'media/file':408 'mime':184,259,314,339,444 'minim':19,61,348 'minimal-permiss':347 'mix':320 'modern':7,49 'movement':126 'narrow':434 'narrowest':152 'network':416 'networking-on':415 'never':252 'new':138 'offici':473 'open':131 'outcom':47 'outsid':267 'own':144 'ownership':174 'part':97 'path':127,210,255,298,363 'pattern':283 'permiss':20,62,90,101,112,170,215,242,318,322,349,412,439,460 'permission-flow':321 'permission-on':411,459 'photo':39,156,231,291 'pick':128 'picker':11,40,53,78,157,232,292,388,451 'picker/saf/fileprovider/chooser':337 'platform':153,431 'possibl':244,441 'practic':119 'prefer':230 'primari':46 'privat':182 'privileg':375 'problem':70 'python3':420 'raw':253 'reach':63 'readabl':302 'recipi':201,266,310,353 'recipient-app':200,352 'recoveri':405 'refer':474 'request':33,284,418 'result':92,114 'return':193 'review':335 'runtim':100,214 'saf':158,233,294 'scenario':364,385,406 'scope':108 'scripts/eval_triggers.py':421 'secur':117 'select':338 'separ':407 'setup':44 'share':5,15,24,38,57,75,141,165,225,245,297,328,367,427,454,471 'share-sheet':14,56,74,453 'sheet':16,58,76,455 'skill':30,66,105,422 'skill-android-media-files-sharing' 'snapshot':370 'source-krutikjain' 'stabl':189 'start':122 'storag':169,183,241,288,438 'support':389 'surfac':154,432 'task':369 'temporari':186,250,359,447 'test':206 'testdebugunittest':382,403 'topic-agent-skills' 'topic-android' 'topic-android-development' 'topic-android-skills' 'topic-androidx' 'topic-claude-code' 'topic-codex' 'topic-cursor' 'topic-jetpack-compose' 'topic-kotlin' 'topic-skills' 'treat':265 'type':185,260,315,340,445 'unclear':334 'untrust':271 'uri':73,176,223,248,307,317,341,442 'use':6,27,28,48,87,371 'valid':192,272 'work':462 'workflow':120 'world':301 'world-read':300 'xml':396","prices":[{"id":"9fbac8ae-2291-43c6-87e8-d263ef80fab0","listingId":"49d67d6d-5159-4a88-9b65-4d6b756e9c13","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"krutikJain","category":"android-agent-skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:20:50.391Z"}],"sources":[{"listingId":"49d67d6d-5159-4a88-9b65-4d6b756e9c13","source":"github","sourceId":"krutikJain/android-agent-skills/android-media-files-sharing","sourceUrl":"https://github.com/krutikJain/android-agent-skills/tree/main/skills/android-media-files-sharing","isPrimary":false,"firstSeenAt":"2026-05-18T13:20:50.391Z","lastSeenAt":"2026-05-18T19:13:27.916Z"}],"details":{"listingId":"49d67d6d-5159-4a88-9b65-4d6b756e9c13","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"krutikJain","slug":"android-media-files-sharing","github":{"repo":"krutikJain/android-agent-skills","stars":8,"topics":["agent-skills","android","android-development","android-skills","androidx","claude-code","codex","cursor","jetpack-compose","kotlin","skills"],"license":"mit","html_url":"https://github.com/krutikJain/android-agent-skills","pushed_at":"2026-03-25T05:47:20Z","description":"Android skills repository for Kotlin, Compose, XML, testing, CI, release work, and legacy upgrades","skill_md_sha":"f16f6dc9600edea0236330a6c4db2a09c3cb0069","skill_md_path":"skills/android-media-files-sharing/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/krutikJain/android-agent-skills/tree/main/skills/android-media-files-sharing"},"layout":"multi","source":"github","category":"android-agent-skills","frontmatter":{"name":"android-media-files-sharing","description":"Use modern Android file, media, picker, FileProvider, and share-sheet APIs with minimal permissions."},"skills_sh_url":"https://skills.sh/krutikJain/android-agent-skills/android-media-files-sharing"},"updatedAt":"2026-05-18T19:13:27.916Z"}}