Android: videocamera, limit length of videos taken
Posted
by AP257
on Stack Overflow
See other posts from Stack Overflow
or by AP257
Published on 2010-03-17T19:19:13Z
Indexed on
2010/03/17
19:21 UTC
Read the original article
Hit count: 435
android
I'm working in Android and starting the video camera activity using ACTION_VIDEO_CAPTURE. Is there any way I can limit the length (in time) of the videos the user can take?
I think this is possible if you use MediaRecorder, but I don't really fancy doing that since it's so much more complicated than using the simple ACTION_VIDEO_CAPTURE.
Current code:
Intent videoCaptureIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
startActivityForResult(videoCaptureIntent,1);
If it's not possible, does anyone know whether I could set a timer (TimerTask?) in Java and then show a Toast message after a certain length of time warning the user that they need to stop filming? (I'm a Java newbie, so I don't know if this is exactly what I need.)
© Stack Overflow or respective owner