Skip to content

bug: Fix Android 14+ media access so new videos appear in library#1595

Open
AndyWangLYN wants to merge 1 commit intoanilbeesetti:mainfrom
AndyWangLYN:heyu-wang-android16-video-discovery
Open

bug: Fix Android 14+ media access so new videos appear in library#1595
AndyWangLYN wants to merge 1 commit intoanilbeesetti:mainfrom
AndyWangLYN:heyu-wang-android16-video-discovery

Conversation

@AndyWangLYN
Copy link

Issue

Newly added videos were not appearing in the media library for some users (notably Android 14+/16 devices), even after refresh/reinstall. As mentioend in: #1592

Root Cause

The app treated READ_MEDIA_VIDEO as the only runtime storage permission state.
On Android 14+, users can grant limited media access (READ_MEDIA_VISUAL_USER_SELECTED), which allows only selected files.
The app did not detect this limited-access mode, so newly added videos outside the selected set were not visible.
Media sync also applied a strict file-path existence filter, which could drop valid MediaStore rows under newer scoped-storage/OEM behavior.

Fix

Added Android 14+ permission support for limited/full media access:
Request/check both READ_MEDIA_VIDEO and READ_MEDIA_VISUAL_USER_SELECTED.
Detect and separate full access vs limited access.
Start sync only when full access is available.
Show a dedicated limited-access prompt so users can grant full access for complete library visibility.

Updated manifest:

Added android.permission.READ_MEDIA_VISUAL_USER_SELECTED.
Hardened media sync ingestion:
Ignore rows with missing/null DATA.
Removed strict File.exists() filtering so valid indexed items are not incorrectly dropped.

Testing Done:

Unit tests for permission resolution and full-vs-limited access detection logic.

@AndyWangLYN AndyWangLYN changed the title Fix Android 14+ media access so new videos appear in library bug: Fix Android 14+ media access so new videos appear in library Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant