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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -