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"

有帮助吗?

解决方案

 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");
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top