安卓视频录制
你好 我已经更改了我的代码,如下所示,但现在的问题是,在三星 Galaxy 中,录制不会在 2 分钟时停止。ohters 很好
Intent i = new Intent("android.media.action.VIDEO_CAPTURE");
i
.putExtra(
android.provider.MediaStore.EXTRA_OUTPUT,
Uri.fromFile(videofile));
i
.putExtra(
android.provider.MediaStore.EXTRA_VIDEO_QUALITY,
0);
i.putExtra("android.intent.extra.durationLimit", 120);
startActivityForResult(i, 2);
hi
i have changed my code as below but the problem now is ,the recording wont stop at 2 minutes in samsung galaxy.ohters fine
Intent i = new Intent("android.media.action.VIDEO_CAPTURE");
i
.putExtra(
android.provider.MediaStore.EXTRA_OUTPUT,
Uri.fromFile(videofile));
i
.putExtra(
android.provider.MediaStore.EXTRA_VIDEO_QUALITY,
0);
i.putExtra("android.intent.extra.durationLimit", 120);
startActivityForResult(i, 2);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于它适用于其他设备,我的猜测是三星相机应用程序无法理解/处理传递给活动的选项。
Since it works on other devices my guess would be that the Samsung camera app doesn't understand/handles that option passed to the activity.
android.intent.extra.durationLimit 在 2.2/API8/Froyo 中可用。
来自 http://developer.android.com/reference/android/provider/ MediaStore.html#EXTRA_DURATION_LIMIT
public static final String EXTRA_DURATION_LIMIT 自:API 级别 8
我认为大多数 Samsung Galaxy 设备都是使用 2.1/Eclair 发布的,有些最近已升级到 2.2/Froyo。
android.intent.extra.durationLimit is available in 2.2/API8/Froyo.
From http://developer.android.com/reference/android/provider/MediaStore.html#EXTRA_DURATION_LIMIT
public static final String EXTRA_DURATION_LIMIT Since: API Level 8
I think most Samsung Galaxy devices were released with 2.1/Eclair and some have recently been upgraded to 2.2/Froyo.