Android的相机拍摄一张照片后,冻结 [英] Android camera freezes after taking one photo
问题描述
我在做与相机和拍摄一张照片相机死机后一个项目和u已完成的活动,并重新召回其采取另一张照片,我怎么能承担只需1-2秒的照片冻结,然后表面观再有摄像头。视频我使用的媒体记录器,以视频preSS停止视频相同的节省和屏幕还活着,但我不能再采取视频我必须重新启动活动?
I'm doing one project with camera and after taking one photo camera freezes and u have to finish the activity and recall it again to take another photo, how can I take photo freeze for just 1-2 sec and then surface view to have the camera again. the same for video I am using media recorder, taking video press stop video saves and screen is still alive but I can not take video again I have to restart the activity?
任何人有一个解决方案?
Anybody have a solution?
推荐答案
在做背景的图像处理的AsyncTask
。这将使你的UI活动继续并拍摄另一张照片。
Do any image processing in a background AsyncTask
. This will allow your UI Activity to continue on and take another picture.
编辑:我不能删除接受的答案,请参见下面stoefin的回答。调用 camera.start preVIEW()
之前采取下一张照片为他工作。
I cannot delete an accepted answer so please see stoefin's answer below. Calling camera.startPreview()
before taking the next photo works for him.
这篇关于Android的相机拍摄一张照片后,冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!