Android相机API - 强制关闭不释放资源摄像头摄像头、相机、资源、Android

2023-09-06 05:47:46 作者:空扰寡人

所以同时发展,我在罕见的情况,并在各种设备上如果应用到强制关闭实现自定义的摄像头应用程序,它并不总是释放相机的资源。

So while developing a custom camera application I've realized on rare occasions and on various devices if the app has to force close, it does not always release the camera resource.

有没有办法找到/检测要紧紧抓住这一资源的过程中,杀了它?或一些其它技术?这是相当困难的bug重现(我反正),但最终该设备必须重新启动。

Is there a way to find/detect the process that is holding onto this resource and kill it? Or some other technique? It is rather difficult bug to reproduce (for me anyway), but ultimately the device has to be restarted.

谢谢!

推荐答案

从上已经就这个问题进行的所有其他职位追逐时,它看起来就像是有崩溃后不得到相机背面没有确保消防方式该装置的重新启动。一种痛苦,以确保万无一失。最好的办法是不要碰撞/捕捉到可能故障的一切。这是一个pretty垃圾的答案,但是这就是我现在努力做的。

From chasing up on all the other posts you have made on this subject, it appears like there is no sure fire way of getting the camera back after a crash without a restart of the device. A pain, to be sure. Best option is not to crash / catch everything that might fault. Which is a pretty rubbish answer, but that's what I'm endeavouring to do now.

很多很多的尝试捕捉的!

Lots and lots of try catch !

 
精彩推荐
图片推荐