Class: $.BackgroundTimer
- Inherits:
-
Application.AppBase
-
Application.AppBase
-
Overview
This app demonstrates how to use a background process. The user can start a 5 minute timer and if the app is not running when the timer expires the watch will push a notification to launch the application.
Instance Member Summary collapse
- _backgroundData as Application.PersistableType
- _timerView as $.BackgroundTimerView or Null
Instance Method Summary collapse
-
getInitialView() as [ WatchUi.Views ] or [ WatchUi.Views, WatchUi.InputDelegates ]
Return the initial view for the app.
-
getServiceDelegate() as [ System.ServiceDelegate ]
Get service delegates to run background tasks for the app.
-
initialize()
Constructor.
-
onBackgroundData(data as Application.PersistableType) as Void
Handle data passed from a background service delegate to the app.
-
onStart(state as Lang.Dictionary or Null) as Void
Handle app startup.
-
onStop(state as Lang.Dictionary or Null) as Void
Handle app shutdown.
-
onStorageChanged() as Void
Handle a storage update.
Instance Attribute Details
var _backgroundData as Application.PersistableType
var _timerView as $.BackgroundTimerView or Null
Instance Method Details
getInitialView() as [ WatchUi.Views ] or [ WatchUi.Views, WatchUi.InputDelegates ]
Return the initial view for the app
getServiceDelegate() as [ System.ServiceDelegate ]
Get service delegates to run background tasks for the app
initialize()
Constructor
onBackgroundData(data as Application.PersistableType) as Void
Handle data passed from a background service delegate to the app
onStart(state as Lang.Dictionary or Null) as Void
Handle app startup
onStop(state as Lang.Dictionary or Null) as Void
Handle app shutdown
onStorageChanged() as Void
Handle a storage update