Yes, I've been playing around with BackgroundJob from nemo-keepalive a little since I wrote that. It seems to mostly work similarly to Insomniac, with the added benefit of preventing suspend after triggering until BackgroundJob's finished() method is called. It's a bit finicky to use though, since it seems to always trigger once immediately upon being enabled, and it doesn't have a repeat property that can be set to false, so to prevent it from running more than once you have to set enabled to true when it's triggered and hope that it doesn't have time to schedule the next event (potentially it might be possible to set enabled to false again immediately after setting it to true and still have it trigger once after the specified interval?).
Regarding timed, I have looked at nemo-qml-plugin-alarms previously, but from what I could tell (though I'll admit I didn't really take the time to actually understand how it works, so it's very possible that I wasn't using it correctly) it is not really possible to schedule a specified piece of code for execution using it; instead, it opens the standard alarm dialog with the snooze and dismiss options when triggered. Additionally it seems that any alarms created are saved to the system and will appear in the Clock app (which I found out much to my dismay after having accidentally created a bunch of one minute long timers). Regards, Arvid On Sunday 16 March 2014 13:48:17 Ove Kåven wrote: > Den 15. mars 2014 23:55, skrev Arvid Fahlström Myrman: > > I'm thinking about trying my luck with nemo-keepalive's KeepAlive, and > > setting its enabled property to true when insomniac triggers to guarantee > > that timer also triggers. > > If you're going with nemo-keepalive, then you shouldn't need insomniac > at all, since from what I understand, nemo-keepalive offers the same > functionality (BackgroundActivity's setWakeupFrequency would probably do > the same thing). And by using nemo-keepalive's setWakeupRange instead of > setWakeupFrequency, you have better control over when exactly you are > woken up. (Perhaps you can even set the range's min and max to the same > value to always get woken up at the exact time you want, worth a try.) > > Another option is to interface with nemo's time daemon, which is > probably what the native Jolla clock does for its alarms. Linking to it > doesn't seem to be allowed in Harbour yet, but in any case, the daemon > and C++ library's source code is at https://github.com/nemomobile/timed, > and there seems to be a QML interface to it at > https://github.com/nemomobile/nemo-qml-plugin-alarms > > _______________________________________________ > SailfishOS.org Devel mailing list _______________________________________________ SailfishOS.org Devel mailing list