• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Turning screen off while video recording

On my machine (Galaxy S3), when I go to turn off the screen, it stops recording. It would really be helpful to battery life if we had an app developer make a feature to turn screen off and still be able to record. I'll pay 4 FRNs for it.. Throw in the ability to mute the camera when it takes a picture and I'll pay 5 FRNs.
 
Upvote 0
So basically, its just something that runs in the background, including when the screen is off. Now, all you have to do, is put your recording code in a service. You may face a problem that your service gets killed by the system, as the android docs specify:

For more information read this article : http://www.learn-information-techno...ideo-recording-on-android-when-screen-is-off/


Note this means that most of the time your service is running, it may be killed by the system if it is under heavy memory pressure. If this happens, the system will later try to restart the service. An important consequence of this is that if you implement onStartCommand() to schedule work to be done asynchronously or in another thread, then you may want to use START_FLAG_REDELIVERY to have the system re-deliver an Intent for you so that it does not get lost if your service is killed while processing it.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones