Application Fundamentals Developer Guide
PUBLISHED
Introduction
Tizen platform supports Web (HTML5,CSS, JavaScript), Native (C/C++) and Hybrid applications (Web & Native). Tizen web applications are packaged according to W3C widget packaging spec. A Web Application is a composition of HTML, JavaScript, and CSS combined as a package that is installed on the device. It can access the device functionalities using Web Runtime.
Tizen platform allows creation of wide range of applications for Tizen devices.
Table of contents
Application Framework Overview
Application Framework provides the functionality for packaging, launching and managing a Tizen application.
The Application Framework provides application management, including launching other applications using the package name, URI, or MIME type. It also launches pre-defined services, such as the system dialer application. The Application Framework also notifies applications of common events, such as low memory events, low battery, changes in screen orientation, and push notification.
App-service facilitates launching an application with a specific feature. It consists of Operation, URI and MIME type. It provides the most basic and effective features like making a phone call to a specific number, requesting image view service to display an image, even without knowing the available image viewer applications, etc.
Application Life Cycle Management
In Tizen, App-core handles the application lifecycle management and system events. It takes care of create, reset, pause, resume and terminate application. Provides handlers for system events such as low memory, low battery, screen orientation change, etc.
CREATE - Is called immediately after the application is launched. Initializes the application and facilitates window creation, data structure allocation, etc.
RESET - Is called at every launch or re-launch request.
PAUSE - Is called when the window of the application becomes invisible. The application's tasks can be suspended in PAUSE state.
RESUME - Is called when the window of application becomes visible again. The paused application's tasks can be resumed.
TERMINATE - Is called after the execution of the main loop. Application is terminated.
When the application is launched, it will be in the READY state. Application enters CREATED state, when the create is called. Application is initialized in the CREATED state. Then, the application enters the main loop and will be in RUNNING state, runs in the foreground and receives input events. Depending on window manager and launch requests, application will be PAUSED or RESUMED. Terminate can be called to terminate the application.
Event Handling
AUL provides features such as sending or receiving requests for launching and terminating an application. AUL daemon facilitates handling the requests. AUL gives the information about the running application.
The two key components in AUL namely, client library and AUL daemon.
AUL requests launch or terminate with application name and the AUL daemon handles the request. AUL daemon queries the application DB, if the application exists, resume will be called on the application else launches the given application.Application can have single or multiple instances.
Application Data Management
Application Data Exchange
The Application Data Exchange (ADE) facilitates two applications can interact with each other using bundles. A developer can create a bundle, add information and send it to another application. Bundle is a type of dictionary abstract data, in which information is stored as key-value pairs. Bundle contains information regarding the state the app should prepare.
Application Information Library
AIL provides features such as adding, updating and deleting application’s information which includes application name, type, icon path, etc. It also provides method to retrieve the list of installed applications based on the given filter.
When an application package is downloaded it gets stored in the device storage and an install request is sent to the package manager (pkgmgr). The package manager calls the backend web runtime installer. The wrt-installer installs the application from the storage location and a notification will be sent to the package manager. Using the inotify, AIL reads the desktop file, parses the data and saves it to the AIL data base.
Application Usage History
RUA logs the application use history with details such as package name, launch-time, application path and application launch argument. When an application is launched, the history gets updated by Launch PAD and the application data is stored in the application DB. Task manager gets the updated history.
Application launch argument facilitates saving the current state of the application (useful in resuming the games).
Application Package Management
Package management is responsible for installing, upgrading and uninstalling of applications. It also facilitates storing the applications information. Please refer to the articles on Web and hybrid application package manager and native application package manager.
References / Abbreviations
References:
Abbrevations:
- AIL - Application Information Library
- ALM - Application Lifecycle Management
- AUL - Application Utility Library
- CSS - Cascaded Style Sheets
- EFL - Enlightenment Foundation Libraries
- HTML - Hyper Text Markup Language
- RUA - Recently Used Application