The exciting journey of Tizen continues with an endeavor to make Tizen app development seamless and offer advanced functionalities by adding new features while polishing up the existing ones.
With rapid development a norm that powerful web technologies come to exist, and the same has been the case with Tizen web apps. Have you ever thought of leveraging your web apps further by adding new functionalities? Yes, you can do that with the help of an addon. The web app addons execute with elevated privileges to provide users with additional functionalities.
This blog walks you through understanding “What an addon is?” and “How to develop an addon?”.
Fundamentally, web apps are bound by the Same Origin Policy (SOP) and cannot access other web application’s data, which is where addons come in very handy. Unlike the web apps, addons run as part of web apps, you cannot run the addons independently.
An addon must serve a single purpose that is narrowly defined and easy to understand. A single addon can include multiple components and a range of functionality, as long as everything contributes towards a common purpose.
At this point, you must be excited to know how you can develop an addon, let us quickly take a deep dive in the development process.
The design of an addon follows the web application’s life cycle. It can customize an action when each web app’s life cycle event such as Prelaunch, Resume, Suspend, or Quit occur.
The following portrays the basic framework of addons:
For more detailed information, see Web Application Addon.
You must already be aware that an addon is not a web application. However, developing an addon is quite similar to developing a Tizen web application.
The following instructions help you to create and run a basic addon:
To know how to create an addon project, see Create addon project. You can view your project in the Project Explorer view of Tizen Studio.
The addon project includes the following essential files and folders:
To know how to manage your addon configuration, see manage addon configuration. This step guides you with configuring the addon by viewing and modifying the configuration details using the following tabs in config.xml file:
To know how to run your addon, see build addon package. You can run your addon on a emulator or on a real target device:
Addons can customize an action and get notified with respect to each web application life cycle event such as Prelaunch, Resume, Suspend, or Quit, as they register their callback.
Addons utilize the Web Runtime JS that manages and controls an addon with respect to the whole application life cycle from the start to the end. Different Addon APIs are provided to support the way to handle the window in both the browser process and the renderer process.
So, what are you waiting for, get started, and enhance your web app features with addons, take your web apps to the next level of usage.