I am trying to get all video available in gallery with below code,
String[] proj = { MediaStore.Video.Media._ID,MediaStore.Video.Media.DATA,MediaStore.Video.Media.DISPLAY_NAME,MediaStore.Video.Media.SIZE };
videocursor = managedQuery(MediaStore.Video.Media.EXTERNAL_CONTENT_URI,proj, null,null, null);
int count = videocursor.getCount();
But I always get count = 0
, where was I made mistake ?
I also tried
Cursor videocursor = managedQuery(MediaStore.Video.Media.INTERNAL_CONTENT_URI, proj, null, null, null);