I use Media Recorder to record videos in the background without displaying a preview in one of my Acts. It works fine, but the camera locks randomly, and the only way to unlock it is to restart the phone.
Can I determine if the camera is locked? How can it be unlocked? If the application crashes, how can I remove the camera?
mCamera.startPreview();
Sometimes the code stops at the line of code above and finally ANR is displayed.
source
share