Current Android Release version:
Version Code: Pie
Version: 9
API level: 28

Tizen: Native Application Lifecycle

Every Application (UI application or service application) in an application package can be identified by its own ID.
The following figure shows the UI and service application life-cycle.


Tizen native application can be in one of the several states. Applications can be launched from the user by launcher or by another application.

Apps that use the Native API rely on a series of lifecycle events in order to operate; these events put the app in various states that enable certain controls or operations.



Ready – Application is launched.
Created – Application starts the main loop.
Running – Application is running and visible to the user.
Paused – Application is running but invisible to the user.
Terminated – Application is terminated.


Below are Registering Callbacks for Events:

app_create_cb() Used to take necessary actions before the main event loop starts. Place the UI generation code here to prevent missing any events from your application UI.


app_pause_cb() Used to take necessary actions when the application becomes invisible. For example, release memory resources so other applications can use them. Do not starve the foreground application that is interacting with the user.

app_resume_cb() Used to take necessary actions when the application becomes visible. If you relinquish anything in the app_pause_cb() callback, re-allocate those resources here before the application resumes.

app_terminate_cb() Used to take necessary actions when the application is terminating. Release all resources, especially any allocations and shared resources, so that other running applications can fully use any shared resources.

Application State Transitions:

The Application API defines 5 states with corresponding transition handlers. The state transition is notified through a state transition callback function, whether the application is created, running, paused, resumed, or terminated. The application must react to each state change appropriately.


No comments:

Post a Comment