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.
source share