安卓视频录制

发布于 2024-09-30 14:41:28 字数 790 浏览 0 评论 0原文

你好 我已经更改了我的代码,如下所示,但现在的问题是,在三星 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

面犯桃花 2024-10-07 14:41:28

由于它适用于其他设备,我的猜测是三星相机应用程序无法理解/处理传递给活动的选项。

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.

归属感 2024-10-07 14:41:28

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文