Questions tagged [mediastore]
The MediaStore provider contains meta data for all available media on both internal and external storage devices.
mediastore
1,136
questions
0
votes
0
answers
10
views
How to get all images infomation from trash bin Using MediaStore in Android
I'm developing an Android application and need to retrieve images that have been deleted and moved to the trash bin. I've attempted to use MediaStore.Images.Media.IS_TRASHED as a projection, but I ...
0
votes
0
answers
82
views
Permissions needed reading picture from gallery using MediaStore API
Consider implementing an app, that lets users pick images taken with a camera from Gallery, and then use those pics on the app.
Project settings are
targetSdk=34, compileSdk=34, minSdk=22
Using ...
0
votes
2
answers
34
views
Unable to get path file ( not media ) using Intent [duplicate]
I have this code where basically i got a file path ( not a media one ), for some reason, in some Android 10 devices I´m getting the path as
/document/msf:<number>
In the manifest I have
<...
0
votes
1
answer
87
views
CameraX ImageCapture invalid URI content
I have problems capturing image with CameraX, it outputs an image in the gallery which is corrupted and i get this error in the log which seems to point to error with the URI content:
E Couldn't ...
0
votes
2
answers
56
views
Can't save a mutableList into android mediaStore
I'm trying to save a mutableList into mediaStore, however I'm getting this error:
java.lang.IllegalArgumentException: Type not supported: interface java.util.List
at com.alclabs.waltv.MainActivity....
0
votes
0
answers
15
views
MediaStore.EXTRA_DURATION_LIMIT not working for android 12 and up
These both code snippets not working for android version 12 and up for time validation in video recording.
I have tried these code snippets:
videoIntent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 10)
...
0
votes
0
answers
20
views
File Deleted from Physical Device but Receiving EEXIST Error
I have an app which creates a .zip file that contains .pdf and .jpgs. If the .zip file is deleted by the user on the physical device, it throws an error when the user goes to create another zip file ...
0
votes
0
answers
46
views
Android 12 MediaStore cannot read audio files from the SD card on a specific device
I am currently developing an MP3 player app, but I'm encountering a problem with reading music files from the SD card through MediaStore on a specific device. To verify if the SD card is recognized ...
0
votes
0
answers
24
views
Trouble Moving Photos to a Selected Folder Below API 29
Does anyone know why I cannot move my photo? Saving the photo to the selected folder works fine with MediaStore.Images.Media.RELATIVE_PATH, but how can I do it below API 29?
My code:
private fun ...
2
votes
0
answers
259
views
SOLVED -- Saving an image from Photo Picker in app folder for permanent access
I have a database (SQLite) in which i want to store a path to an image.
I am using the PhotoPicker to get the image, I set it with "setImageURI()", this part works (the PhotoPicker is ...
0
votes
0
answers
92
views
ContentResolver.query() on MediaStore Uri works only for Android API 31+ - MediaStore.getMediaUri() BUG?
I checked the following code and it works only for API 31+, for lower versions the Cursor is null
private fun getMediaInfo(context: Context, uri: Uri): Long? {
try {
context....
0
votes
1
answer
61
views
Mediastore with cameraX does not overwrite saved photos
I wanted the photos to be overwritten, but instead (2), (3) etc. appear next to each photo
I tried setting a permanent save location, but it didn't work. This is the code i'm using to capture and save ...
0
votes
1
answer
252
views
MediaStore.getVolumeName(uri) - java.lang.IllegalArgumentException: Missing volume name
Using SAF I selected a folder for R/W media files.
For MediaStore.Audio.Media.getContentUri(volumeName) (29+ API) I need to specify a volume name (it can be a primary storage or external sd card) and ...
0
votes
0
answers
81
views
In android 12/13 Is possible delete file in Media.store (picture) , writed by other app?
I´m using pictures and videos saved by other app in "Pictures" folder, and copied/imported in myApp files zone.
I want this files be removed from "Pictures" after copying to my app....
0
votes
1
answer
100
views
Access Files on a USB OTG device (SD Card reader) via MediaStore
Can I access the Images on a USB OTG device (SD card reader) connected to my Android device with MediaStore?
I am able to access the files using the Storage Access Framework with this code. I'm trying ...