How to get all non media files in android 2.3 ?
ContentResolver cr = getApplicationContext().getContentResolver();
Uri uri = MediaStore.Files.getContentUri("external");
String selection = MediaStore.Files.FileColumns.MEDIA_TYPE + " = " + MediaStore.Files.FileColumns.MEDIA_TYPE_NONE;
imagecursor = cr.query(uri, null, selection, null, null);
while (imagecursor.moveToNext()) {
count++;
}
From the above i am getting all non media files in Android 4.0 and above. But GetContentUri(external)
is not working in Android 2.3, its showing that its added in API level 11. Is there any alternative to get all non media files in Android 2.3 ?