Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS

API Documentation

Documentation for developing SailfishOS applications
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Properties
  • Signals
  • Methods
  • Detailed Description

BackgroundJob QML Type

Provides means for waking up from / preventing suspend More...

Import Statement: import Nemo.KeepAlive 1.2
  • List of all members, including inherited members

Properties

  • enabled : bool
  • frequency : enumeration
  • maximumWait : int
  • minimumWait : int
  • running : bool
  • triggeredOnEnable : bool

Signals

  • triggered()

Methods

  • begin()
  • finished()

Detailed Description

Provides abstraction for scheduling tasks that can wake the system from suspended state and prevent system from suspending while handling the wakeup.

Property Documentation

enabled : bool

If changed from false to true, starts the timer.

If changed from true to false, stops the timer / ends suspend prevention.

enabled defaults to false.


frequency : enumeration

Sets the desired wakeup frequency and starts the timer.

Note that wakeups are aligned in system wide manner so that every timer that is scheduled to occur in the same frequency gets triggered simultaneously. Effectively this means that the first wakeup most likely happens earlier then the requested frequency would suggest.

The frequence can be one of:

  • BackgroundJob.ThirtySeconds
  • BackgroundJob.TwoAndHalfMinutes
  • BackgroundJob.FiveMinutes
  • BackgroundJob.TenMinutes
  • BackgroundJob.FifteenMinutes
  • BackgroundJob.ThirtyMinutes
  • BackgroundJob.OneHour - the default
  • BackgroundJob.TwoHours
  • BackgroundJob.FourHours
  • BackgroundJob.EightHours
  • BackgroundJob.TenHours
  • BackgroundJob.TwelveHours
  • BackgroundJob.TwentyFourHours
  • BackgroundJob.MaximumFrequency

Note that defining wakeup frequency is mutually exclusive with using wakeup range.

See also BackgroundJob::minimumWait and BackgroundJob::maximumWait.


maximumWait : int

Sets the desired maximum wait delay in seconds and starts the timer.

See also BackgroundJob::minimumWait and BackgroundJob::frequency.


minimumWait : int

Sets the desired minimum wait delay in seconds and starts the timer.

See also BackgroundJob::maximumWait and BackgroundJob::frequency.


running : bool

Returns true when the timer has been triggered (and the device is prevented from suspending).


triggeredOnEnable : bool

This property serves similar purpose as triggeredOnStart in standard QML Timer objects: Setting triggeredOnEnable to true causes triggering immediately after enabling - which can be useful for example for establishing an initial state.

triggeredOnEnable defaults to false.


Signal Documentation

triggered()

This signal is emitted when timer wakeup occurs and system is prevented from suspending.

In order to allow suspending again, the application must define onTriggered handler and make sure one of the following actions are taken after handling tasks related to the wakeup:

  • set BackgroundJob::enabled property to false - to stop the timer
  • call BackgroundJob::finished() method - to schedule the next wake up

Method Documentation

begin()

If enabled property is true, switches BackgroundJob to running state and emits BackgroundJob::triggered() signal.


finished()

If enabled property is true, reschedules wake up timer and ends suspend prevention.


  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn