Camera.lock, unlock() managed automatically for you since Android 4.0? -


i started android development , wrote simple camera app using tutorial: http://developer.android.com/guide/topics/media/camera.html#custom-camera

there read: "note: starting android 4.0 (api level 14), camera.lock() , camera.unlock() calls managed automatically."

but mean? camera app supports android 16 (4.1.2) , 17 (4.2.2) if discard lock , unlock calls error mediarecorder (-19). how let handle android it? or mean "managed automatically"?

as android documentation states lock() called automatically in mediarecorder.start(). think couldn't remove unlock() call because when start() method call lock() method on camera, locked default, find camera locket , rise runtimeexception.

since api level 14, camera automatically locked applications in start(). applications can use camera (ex: zoom) after recording starts. there no need call after recording starts or stops.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -