android-gallery-bugfix-skill

Diagnose and fix Android gallery, MediaStore, and image-loading issues across Android 9-14+.

1|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/TE-QuanBZhang/skills-pool --skill android-gallery-bugfix-skill-te-quanbzhang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-gallery-bugfix-skill
Source: https://github.com/TE-QuanBZhang/skills-pool/tree/main/ai-coding/skills/android-gallery-bugfix-skill
Command: npx skills add https://github.com/TE-QuanBZhang/skills-pool --skill android-gallery-bugfix-skill-te-quanbzhang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Android gallery bugs are notoriously version-sensitive: an empty photo list on Android 13, a save that never appears on Android 10, or a delete that silently fails on Android 11 all have different root causes in permissions, Scoped Storage, and MediaStore behavior. This Skill provides a structured triage and fix workflow so you stop guessing and systematically isolate whether the failure is a permission, query, URI, decode, or UI-binding problem. ## Core Features & Use Cases - Systematic Triage Workflow: Step-by-step diagnosis covering reproduction conditions, logcat/dumpsys collection, and layered root-cause isolation from permissions down to RecyclerView binding. - Version-Specific Guidance: Concrete permission and API checklists for Android 9, 10 (Scoped Storage), 11/12, 13 (granular media permissions), and 14+ (partial photo access). - Image Pipeline Coverage: Fix patterns for MediaStore queries, EXIF orientation, Glide/Coil/Picasso loading, OOM prevention, save/delete flows with IS_PENDING and createDeleteRequest. - Use Case: A user reports photos saved by your app don't appear in the system gallery on Android 12. The Skill guides you to check whether IS_PENDING was flipped back to 0, whether the OutputStream was closed, and whether MediaStore was used instead of a raw file path. ## Quick Start Ask the AI to diagnose why the photo list in your Android app is empty on Android 13 using the gallery bugfix workflow.

Frequently Asked Questions about android-gallery-bugfix-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix an empty gallery list on Android 13?

Check that your app requests the granular media permissions READ_MEDIA_IMAGES and READ_MEDIA_VIDEO instead of the legacy READ_EXTERNAL_STORAGE. Also verify your MediaStore query selection, sortOrder, and MIME type filters are not excluding items.

Why are photos not visible in the gallery after saving on Android 10+?

The most common cause is setting IS_PENDING to 1 on MediaStore insert and forgetting to flip it back to 0 after writing. Also confirm the OutputStream was flushed and closed, and that you used MediaStore rather than writing a raw file path.

How do I handle Android 14 partial photo access?

Declare READ_MEDIA_VISUAL_USER_SELECTED and handle the case where the user grants access to only some photos. Check Uri availability per item, since the system may re-prompt or revoke access to previously granted items.

Why do images show the wrong orientation after loading?

The EXIF orientation flag is not being applied. Read EXIF via ExifInterface from an InputStream on the content Uri, and be aware that some compression or resizing paths silently strip EXIF data.

What causes OOM crashes when loading gallery images in a RecyclerView?

Loading full-resolution bitmaps into thumbnail slots without sampling is the usual cause. Use Glide or Coil with view-size overrides, add Paging, and cancel requests in onViewRecycled to prevent stale loads.

Can I use file paths instead of content Uris on Android 10+?

No. Under Scoped Storage the MediaStore DATA column is deprecated and unreliable. Use ContentUris.withAppendedId to build content Uris and open them with contentResolver.openInputStream, never FileInputStream on uri.path.