Ask / Submit

How to find out if the phone is in idle state?

asked 2014-08-03 13:40:43 +0200

vertoe gravatar image

I'm writing an app that reads out web APIs every 5 minutes.

Obviously I dont want to do this as long as the phone is in idle state.

How can I check this for my app?

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted

answered 2014-08-04 17:52:32 +0200

tace gravatar image

In qt app you can check flag. I catch the signal of change of this flag like this:

import QtQuick 2.0
import Sailfish.Silica 1.0


    onApplicationActiveChanged: {
        if (! {
            // App not active, stop doing stuff
        else {
            // App is active again, keep on doing stuff

edit flag offensive delete publish link more


Ok that's what I did basicly. Thought that was not enough.

vertoe ( 2014-08-07 09:13:44 +0200 )edit
Login/Signup to Answer

Question tools

1 follower


Asked: 2014-08-03 13:40:43 +0200

Seen: 257 times

Last updated: Aug 04 '14