링크:
[1] https://docs.tizen.org/application/web/guides/applications/addon/#configure
[2] https://docs.tizen.org/application/web/guides/applications/addon/#event
[3] https://docs.tizen.org/application/web/guides/applications/addon/#mechanism
[4] https://docs.tizen.org/application/web/guides/applications/addon/#packaging
[5] https://docs.tizen.org/application/web/guides/applications/addon/#management
[6] https://docs.tizen.org/application/web/guides/applications/addon/
[7] https://docs.tizen.org/application/web/get-started/addon/first-addon/#create)
[8] https://docs.tizen.org/application/web/get-started/addon/first-addon/#manage-addon-configuration
[9] https://docs.tizen.org/application/web/get-started/addon/first-addon/#build-your-addon-package
[10] https://docs.tizen.org/application/web/get-started/addon/first-addon/#run-your-addon
[11] https://docs.tizen.org/application/web/get-started/addon/first-addon/#run-on-emulator
[12] https://docs.tizen.org/application/web/get-started/addon/first-addon/#run-on-target-device
[13] https://developer.tizen.org/ko/blog/addon-enhance-your-web-apps
Addon: Enhance your Web Apps
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?”.
Addon: The concept
An addon is a JavaScript snippet with a manifest file that allows additional common functionalities such as pop-up to web applications. Addons are small software packages that enhance and customize the functionality of a web app.
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.
Nonetheless, using the addons, you can empower a web app to bypass SOP and extend on capabilities of app functionalities. Addon enables users to tailor functionality and behavior to individual needs or preferences. It is built on web technologies such as HTML, JavaScript, and CSS.
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 [6].
Develop 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:
Step 1: Create an addon project
To know how to create an addon project, see Create addon project [7]. You can view your project in the Project Explorer view of Tizen Studio.
The addon project includes the following essential files and folders:
Step 2: Manage addon configuration
To know how to manage your addon configuration, see manage addon configuration [8]. This step guides you with configuring the addon by viewing and modifying the configuration details using the following tabs in config.xml file:
Step 3: Build your addon package
To know how to build your addon package, see build addon package [9]. The build process performs a validation check and compiles your JavaScript and CSS file, and once the addon is built, you can run it.
Step 4: Run addon
To know how to run your addon, see build addon package [10]. You can run your addon on a emulator or on a real target device:
Running on emulator [11]
Running on Target device [12]
Summarizing addons
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.