Save camera while paused

I have a flashlight app, and if the app is paused, the camera is released. Be it a home button or a power button. I want the camera to stay alive when any of them are pressed and released, when I completely close the application. How can I do it?

+4
source share
1 answer

This function is designed so that you do not consume more power than necessary, and that other software on the device can access the camera on demand. Some useful information on the activity life cycle can be found here .

Typically, Android developer options:

  • Create a custom firmware for Android that gives your application privileged access to the camera. This option, as a rule, is really possible if you provide special equipment with this firmware and your application pre-installed.

  • Approach the design of your application in a different way, which does not require the use of a camera if it is not in the foreground.

  • Adhere to existing behavior and describe in detail the warnings for the user in the market (and possibly as a pop-up dialog for pop-ups to get their attention) to reduce the number of complaints.

+2
source

All Articles