I am accessing videosfrom a programmatically created folder using the following code. But it returns the number of cursors 0, what should I do to solve this problem.
I tested it on some devices, this does not work for everyone
String selection=MediaStore.Video.Media.DATA +" like?";
String[] selectionArgs=new String[]{"%smartVcall%"};
videocursor = managedQuery(MediaStore.Video.Media.EXTERNAL_CONTENT_URI,
parameters, selection, selectionArgs, MediaStore.Video.Media.DATE_TAKEN + " DESC");
To create a folder, I use the following code
File moviesDir = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/smartVcall");
if (!moviesDir.exists()) {
moviesDir.mkdirs();
}
source
share