Packaging a Hybrid Application
PUBLISHED
The Tizen platform allows you to create hybrid application packages, which combine a Web UI application and 1 or more native service or widget applications.
Creating a Project for a Hybrid Package
To create the projects for a hybrid package:
-
Create a Web UI project:
-
In the IDE, select File > New > Tizen Web Project.
-
Select a basic application template, enter the project name, check the version, and click Finish.
-
-
Create a native service or widget project:
-
In the IDE, select File > New > Tizen Native Project.
-
Select the service or widget application template, enter the project name, check the version, and click Finish.
-
-
The created projects are shown in the Project Explorer view.
Defining Project Settings for Hybrid Packaging
To create a hybrid package, establish a project reference between the Web and native projects:
- In the Web UI project context menu, select Properties > Tizen SDK > Package > Multi.
- Select the check box for the service or widget application to be included in the hybrid package, and click OK.
In the Project Explorer view, the native project shows that it is referenced with the Web UI project.
Building a Hybrid Package
To build a hybrid package:
- In the Web UI project context menu, select Build Package.
- The IDE generates a WGT package that contains the Web and native applications.
The generated WGT file has the following content hierarchy:
Checking the Native Manifest File in the WGT File
The hybrid package contains a config.xml
file (from the Web project) and a tizen-manifest.xml
file (from the native project).
During packaging, the package and appid values of the tizen-manifest.xml
file are changed based on the config.xml
file.
-
config.xml
(Web UI application)<?xml version="1.0" encoding="UTF-8"?> <widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns=http://www.w3.org/ns/widgets id="http://yourdomain/WebBasicApplication" version="1.0.0" viewmodes="maximized"> <tizen:application id="Mz5h6LQ0GH.WebBasicApplication" package="Mz5h6LQ0GH" required_version="2.3.1"/> … <tizen:profile name="wearable"/> </widget>
-
tizen-manifest.xml
in the WGT file (package and appid values have been replaced)<?xml version="1.0" encoding="UTF-8" standalone="no"?> <manifest xmlns="http://tizen.org/ns/packages" api-version="2.3.1" package="Mz5h6LQ0GH" version="1.0.0"> <profile name="wearable"/> <service-application appid="Mz5h6LQ0GH.nativeserviceapplication" exec="nativeserviceapplication" multiple="false" nodisplay="true" taskmanage="false" type="capp"> … </service-application> </manifest>