在Android 4.0的后台录像 [英] Background video recording in Android 4.0

查看:322
本文介绍了在Android 4.0的后台录像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图组织背景的视频录像中的Andr​​oid 4.0。但我不能这样做,因为这些问题是:

  1. 虚拟表面的MediaRecorder不起作用(错误:无效的面​​)

  1. Dummy Surface does not work in MediaRecorder (error: invalid surface)

如果您使用的表面1×1像素的活动,表面被破坏的活动暂停(记录停止)

If you use Surface 1 x 1 px on Activity, Surface is destroyed on Activity pause (recording is stopped)

如果您使用的表面1×1像素的WindowsManager,表面被破坏的应用程序暂停(记录停止)

If you use Surface 1 x 1 px on WindowsManager, Surface is destroyed on Application pause (recording is stopped)

表面纹理不起作用在MediaRecorder.set previewDisplay(新的表面(表面纹理))

SurfaceTexture does not work in MediaRecorder.setPreviewDisplay(new Surface(SurfaceTexture))

小部件不允许处理表面1×1像素

Widget does not allow to handle Surface 1 x 1 px

状态栏不允许处理表面1×1像素

Status Bar does not allow to handle Surface 1 x 1 px

请帮我找到正确的方式。

推荐答案

我找到了答案:这是需要使用窗口管理和服务调用它

I found the answer: it is necessary to use WindowManager and call it from Service.

这篇关于在Android 4.0的后台录像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆