Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [solved] Timer in android doesn't trigger with screen turned off
Forum Updated to NodeBB v4.3 + New Features

[solved] Timer in android doesn't trigger with screen turned off

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 1 Posters 1.8k Views 1 Watching
  • 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.
  • H Offline
    H Offline
    habamax
    wrote on last edited by
    #1

    My timer is set up to trigger an event after 5 minuts. If device screen is on or device itself is connected to my laptop via usb -- it works. I can hear a sound after 5 minuts.

    When you disconnect phone from laptop, screen is off after timeout I can hear no sound after scheduled 5 minuts.

    Is this an android eventloop issue?
    I have tried to expose QTimer object to QML but it behaves the same way.

    How do I solve this issue? Would wrapping QTimer into worker thread helps here?

    1 Reply Last reply
    0
    • H Offline
      H Offline
      habamax
      wrote on last edited by
      #2

      Is the only way to do it is to create android service and connect it to my app?

      1 Reply Last reply
      0
      • H Offline
        H Offline
        habamax
        wrote on last edited by
        #3

        I have added PARTIAL_WAKE_LOCK management using androidextras and it works now.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved