android - How can I release the camera when another application requests it? -


I have two applications that use both cameras:

  1. I developed a flashlight App
  2. Camera app

The Torchlight app opens the camera, turns on the flash, and runs in the background. However, if you start the camera app when turning on the flashlight, there is an error in the camera app because the camera is already in use by the flashlight app:

Can not retrieve the device < / P>

In the Torch app, what do I request for an app when I release the camera?

This is called the release every time onPause . To call it, call Camera.release () . For this, you should give it to onResume () .

will request again.

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -