I learned from few post here that MediaStore.EXTRA_DURATION_LIMIT for capturing video, could work only from versions 2.2 ,but i am using Samsung Galaxy S II which is of 2.3.3 version . The below code seems to have no effect for max duration.
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 2000);
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0);
intent.putExtra(MediaStore.EXTRA_FINISH_ON_COMPLETION,true);
startActivityForResult(intent, REQUEST_TAKE_VIDEO);
If its device specific,then is there a workaround for this issue.
The documentation states that
EXTRA_DURATION_LIMIT
is in seconds.Setting it to
2000
would be 33 minutes, try 2:when you set EXTRA_VIDEO_QUALITY to zero, It is create mms and not works as a video recorder:EXTRA_VIDEO_QUALITY
If you want set value of EXTRA_DURATION_LIMIT, then you have to change EXTRA_VIDEO_QUALITY value to 1.