String selection=MediaStore.Video.Media.DATA +" like?";
String[] selectionArgs=new String[]{"%FolderName%"};
videocursor = managedQuery(MediaStore.Video.Media.EXTERNAL_CONTENT_URI,
parameters, selection, selectionArgs, MediaStore.Video.Media.DATE_TAKEN + " DESC");
How to get all video files in specific folder in android phone external storage?
-
13-06-2023 - |
Question
I create a method that upload and save the video in "/download" folder in external storage in the android phone, if i use MediaStore.Video.Media.EXTERNAL_CONTENT_URI
all video files will be included, i want to know how to get the exact path of the "/download" folder in the phone storage?
because if i use this
private static final Uri sourceUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
videoCursorTitle = getContentResolver().query(sourceUri, projection,
null, null, orderByTITLE);
if i use that it gets all the video from the external storage, how to get video in a specific folder? folder name is "/download"
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow