How to get Duration of captured video in android?
android
Solution
Using cursor you can get duration and there are `duration` Column in Cursor and you can get as a string.
Cursor cursor = MediaStore.Video.query(getContentResolver(),data.getData(),
new String[] { MediaStore.Video.VideoColumns.DURATION });
System.out.println(">>>>>>>>>>"+cursor.getCount());
cursor.moveToFirst();
String duration = cursor.getString(cursor.getColumnIndex("duration"));
Problem
Using below code i captured Video,but how to get duration of captured video in android ? and also when sometimes user discard video and record new video then get duration of new video . ``` Intent cameraIntent = new Intent( android.provider.MediaStore.ACTION_VIDEO_CAPTURE); startActivityForResult(cameraIntent, TAKE_VIDEO); ```