CDT App Lifecycle

Apps that run in the container have their lifecycle managed.
The container checks for various functions implemented by the app. If those functions are implemented, the container will execute them accordingly. The following functions are supported by the container:

1. void onStart()

This method is called when the app is first instantiated in the current tab for the first time.

1
2
3
onStart: function() {
// Code here
}

2. void onPause()

This method is called when the user has left your app to view a different app.

1
2
3
onPause: function() {
// Code here
}

3. void onResume()

This method is called when the user has navigated away from the app to a different app, and has navigated back.

1
2
3
onResume: function() {
// Code here
}