开发者

Max duration for capture video on android

开发者 https://www.devze.com 2023-01-18 11:15 出处:网络
I have code for capturing a video clip on Android: Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);

I have code for capturing a video clip on Android:

Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
intent.putExtra("android.intent.extra.durationLimit", 30000);
intent.putExtra("EXTRA_VIDEO_QUALITY", 0);
startActivityForResult(intent, ActivityRequests.REQUEST_TAKE_VIDEO);

This code works well on API 2.2, but开发者_C百科 the duration limit does not work on API 2.1 (Galaxy S). Is there some constant or parameter for setting this time, or is there a better approach than the one I am taking?

I ask because I found another application that works on the Galaxy S (called Vibrant) which can record video for a short amount of time.


android.intent.extra.durationLimit was introduced in API Level 8, so it's not available in Eclair and earlier, unfortunately. Some device manufacturers may have a proprietary way to set the maximum duration on older devices, which explain why you have seen this working on some pre-Froyo applications.


For your information it does not run on HTC devices. welcome to the android world.

0

精彩评论

暂无评论...
验证码 换一张
取 消