I will load all video from raw folder and show it with mediaplayr. for this use following code but get Exception. what is wrong? thanks
String filePath = "android.resource://" + this.getPackageName() + "/raw/";
ContentResolver resolver=getContentResolver();
String projection[]= {MediaStore.Video.Media._ID,MediaStore.Video.Media.DISPLAY_NAME,MediaStore.Video.Media.DURATION};
Cursor cursor= resolver.query(MediaStore.Video.Media.INTERNAL_CONTENT_URI ,projection, MediaStore.MediaColumns.DATA+ "='"+filePath+"'", null, null);
videoDetails=new ArrayList<VideoInfo>();
while(cursor.moveToNext())
{
int id=cursor.getInt(0);
String title=cursor.getString(1);
int dur=cursor.getInt(2);
videoDetails.add(new VideoInfo(id,title,dur));
}