tags:

views:

69

answers:

0

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.)