I’m encountering an issue where videos edited in Samsung Gallery become permanently inaccessible to my code (and even to other third-party apps).
Problem: <br>
After editing a video in Samsung Gallery and tapping “Save” (overwrite), the video does not appear in the “Videos” tab of any media picker. The video appears in Gallery under “Collections -> Camera”. My code and other External apps cannot open the file.
note: MediaStore shows IS_PENDING = 1 and it never resets.<br>
The other option Save as copy works correctly (a new duplicate file is accessible).
Reproduction steps: <br> Open Samsung Gallery and Select a video from camera roll.<br> Edit the video. Tap “Save” (overwrite) then try to access the video.
Result: <br>
Video is missing from Videos tab. Visible in Gallery, but cannot be opened externally
This is my code to read the file, but I get the result of "pending" and no file access:
val projection = arrayOf(MediaStore.Video.Media.IS_PENDING)
val cursor = contentResolver.query(
MediaStore.Video.Media.EXTERNAL_CONTENT_URI,
projection,
"${MediaStore.Video.Media._ID} = ?",
arrayOf(videoId.toString()),
null
)
cursor?.use {
val pendingCol = it.getColumnIndexOrThrow(MediaStore.Video.Media.IS_PENDING)
val isPending = it.getInt(pendingCol)
Log.d("MediaStore", "Video $videoId IS_PENDING: $isPending")
}
Code result: This consistently logs IS_PENDING = 1 and never changes.
Additional context: <br> This occurs on multiple Samsung devices (Z Fold 3 and others). It was tested on Android 13+ / One UI 5+. “Save as copy” works correctly (a "new file" copy is accessible)
Questions
When and how is IS_PENDING expected to be reset to =0 after saving?
How can my app access a media file owned by another app (eg: Gallery) while IS_PENDING=1?
Looking for clarification or possible workarounds.