安卓:是否有可能采取与相机拍摄照片从服务没有用户界面 [英] Android: Is it possible to take a picture with the camera from a service with no UI
本文介绍了安卓:是否有可能采取与相机拍摄照片从服务没有用户界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
只有code我已经能够获得工作拍照用相机从活动中运行。我相当肯定,有可能拍摄照片从服务中,或由该服务推出了一个AsyncTask的。
The only code I have been able to get working to take a picture with the camera runs from an activity. I am fairly certain that it is possible to take a photo from within a service, or from an AsyncTask launched by the service.
在我看来,相机API需要一个SurfaceView必须绑成的用户界面。也许我是错的。有没有人写code其中的照片可以从一个服务?
It seems to me that the camera API needs a SurfaceView which must be tied into a UI. Maybe I am wrong. Has anyone written code where a photo can be taken from a service?
推荐答案
我不认为这是可能的,摄像头需要preVIEW屏幕。这里见类似的问题
I don't think this is possible as the camera needs a preview screen. See similar question here
这篇关于安卓:是否有可能采取与相机拍摄照片从服务没有用户界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文