omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    How to prevent screen lock

    Pythonista
    3
    4
    3996
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tachijuan
      tachijuan last edited by

      Folks,

      I have a script that I wrote to keep track of a pool game my buddies and I play. It uses the ui module to build a simple GUI with a list of players and keeps track of the score by touches on the names of the players. Sometimes a player's turn in this game can last a while and the screen locks. Is there any way to temporarily disable the phone's screen lock function?

      Thanks...

      1 Reply Last reply Reply Quote 0
      • Phuket2
        Phuket2 last edited by

        @tachijuan. I am new, but I think you can use:
        console.set_idle_timer_disabled(flag)
        Disable or enable the idle timer (which puts the device to sleep after a certain period of inactivity).

        1 Reply Last reply Reply Quote 0
        • brumm
          brumm last edited by

          link

          1 Reply Last reply Reply Quote 0
          • tachijuan
            tachijuan last edited by

            excellent. Thanks everyone. Was looking for screen lock and not sleep. And was looking through the UI module and not the console module. This works perfectly.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors