We have moved to a new Sailfish OS Forum. Please start new discussions there.
3

How to put my app into idle mode? [answered]

asked 2014-08-07 14:22:28 +0300

vertoe gravatar image

I just developed my first app and submitted it to the harbour.

I'm using checks status === Cover.Active and status === PageStatus.Active to ensure my app is only doing stuff while it is really active.

But my app got rejected twice now both times I only get told how to check that my app is not in idle mode but not really telling my how an app can be put in idle mode.

So, here is my question? How can I put my app in idle mode if the phone is locked/black screen?

For reference, this is my source code.

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by nthn
close date 2014-08-07 22:07:07.781058

Comments

Nice idea, cannot answer to your question, but would for sure try as soon it gets accepted.

magullo ( 2014-08-07 16:11:09 +0300 )edit

1 Answer

Sort by » oldest newest most voted
5

answered 2014-08-07 21:43:46 +0300

vertoe gravatar image

OK, checking only for PageStatus is not enough. Here's what I had to do:

Application Page Status (Main Focus)

If you are on a page of the application (meaning the main focus is on the application), you have to check for the Qt.Application.Active status.

Page {
    property bool pageActive: Qt.application.active
}

In addition you can check for the page status.

Page {
    property bool pageActive: Qt.application.active && status === PageStatus.Active
}

It wont work without the Qt.Application.Active status though.

Cover Page Status (Background Process)

If you minimize your app and only the cover is displayed, you have to check for the Cover status.

CoverBackground {
    property bool coverActive: status === Cover.Active
}

Using the Qt.application.state was not very helpful at all, it always says undefined.

edit flag offensive delete publish link more

Question tools

Follow
2 followers

Stats

Asked: 2014-08-07 14:22:28 +0300

Seen: 466 times

Last updated: Aug 07 '14