Reputation: 2180
In my flashlight widget, there is a service that manages the camera and turns it on or off. If you turn on the LED and lock the screen for a while, it takes a long time to turn off when you unlock your phone(~40 seconds!). I checked and it turns out that it's because the camera takes forever to release itself. What is causing this, and how can I fix it?
Upvotes: 0
Views: 205
Reputation: 102
I had the same problem. But if you keep the device on with a wakelock (this will keep the cpu on, see http://developer.android.com/training/scheduling/wakelock.html) the problem does not occure. Just make sure, that you release the lock when you release the cam.
Hope that helps
Upvotes: 2