Life Cycle
As shown in the picture:
Description
- App onCreate
- Initialize the app global data for use by all pages. (Note: You can't draw the UI here, you haven't loaded the page yet)
- Function signature
(params: string) => void
, whereparams
is passed by theparams
parameter inlaunchApp
- Page onInit
- Page build
- Drawing UI
- Function signature
() => void
- Page onDestroy
- Destroy page
- Function signature
() => void
- App onDestroy
- Destroy app
- Function signature
() => void
info
The life cycle of SecondaryWidget and Shortcut Cards is extended with onResume
and onPause
based on Page, see Register SecondaryWidget and Shortcut Cards