[SailfishDevel] QML Timer stops running
Thomas Tanghus
thomas at tanghus.net
Wed Jan 15 12:16:23 UTC 2014
On Wednesday 15 January 2014 12:48 Oleksii Serdiuk wrote:
> On 15/01/14 11:54, Thomas Tanghus wrote:
> > On Wednesday 15 January 2014 08:26 Jonni Rainisto wrote:
> >> dont use libiphb every 5 seconds, that will kill
> >> batterylife for suspend (store QA will reject apps that eat battery). Its
> >> more meant to be triggered every 10, 15, 30 etc. minutes. So if you want
> >> to
> >> make 25 minute timer that works even while suspended, then you should do
> >> libiphb to wake up after 25 minutes.
> >
> > The reason for the 5-10 second wakeup is that I want to update cover until
> > screen goes black, and I haven't found a way to detect that, and
> > applicationActive doesn't do it. Maybe my search-foo looked for the wrong
> > keywords.
>
> Use Cover.status property:
>
> https://sailfishos.org/sailfish-silica/qml-sailfishsilica-cover.html#status-> prop
>
> Cover.Active - the cover is visible, and the user can interact with it
So (saying my covers id is 'cover') I could do:
property bool visible: cover.active || applicationActive;
> However, when user is peeking, status property is Cover.Inactive:
Minor issue compared to the code you don't have to write ;)
> Cover.Inactive - the cover is not active, the user cannot interact with
> the cover, and it is not visible unless the user is peeking
--
Med venlig hilsen / Best Regards
Thomas Tanghus
More information about the Devel
mailing list