Turning screen off while video recordingTips


Last Updated:

  1. ConceptVBS

    ConceptVBS Well-Known Member This Topic's Starter

    Joined:
    Jun 1, 2010
    Messages:
    234
    Likes Received:
    52
    Press the power button to turn off the screen while recording video. This way you dont accidentally hit the stop recording button.
     

    Advertisement
  2. COMBORICO

    COMBORICO New Member

    Joined:
    Nov 18, 2013
    Messages:
    2
    Likes Received:
    0
    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.
     
  3. lenrok258

    lenrok258 New Member

    Joined:
    Jul 7, 2014
    Messages:
    3
    Likes Received:
    1
  4. Vinayaka Bhat

    Vinayaka Bhat New Member

    Joined:
    Jan 21, 2016
    Messages:
    1
    Likes Received:
    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.
     

Share This Page

Loading...