How to get Duration of captured video in android? -
using below code captured video,but how duration of captured video in android ? , when user discard video , record new video duration of new video .
intent cameraintent = new intent( android.provider.mediastore.action_video_capture); startactivityforresult(cameraintent, take_video);
using cursor can duration , there duration column in cursor , can 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"));
Comments
Post a Comment