Configuring Applications
The Tizen web application configuration file is composed of XML elements, including the <widget>
element as its root and other elements. These elements represent application information, such as configuration elements and Tizen extending configuration elements for mobile and wearable applications.
This configuration information is used when you install or run the Tizen web application on the Tizen platform. The Tizen web application project must have the config.xml
file in the project root directory.
The configuration file can be easily edited with the Web application configuration editor (form editor), or you can modify the XML structure directly using the configuration source editor. With the form editor, you can set the project configuration (manifest), even if you have no experience with developing a Tizen web application project. If you are fluent with the configuration file XML structure, you can create the configuration file directly through the configuration source editor.
NoteThe
config.xml
must conform to both the XML file format and the W3C specification requirements. Editing the file XML structure with the configuration source editor is intended for advanced users only.
Edit the config.xml file
There are 2 different ways to edit the config.xml
file, which are described below:
-
Use the Source tab:
-
Double-click the
config.xml
file in the Project Explorer view. -
Select the Source tab.
Figure: Source tab
-
-
Use the form tabs:
-
Double-click the
config.xml
file in the Project Explorer view. -
Select one of the form tabs (Overview, Features, Privileges, Localization, Policy, Preferences, Tizen).
Figure: Form tabs
-
Configuration element hierarchy
The Tizen web application configuration file consists of XML elements organized in a hierarchy. The following tree structure shows the relationship between the elements of the config.xml
file.
<widget> |
|||
<access> |
|||
<tizen:icon> |
|||
<tizen:display-name> |
|||
<tizen:capability> |
|||
<tizen:account> (in mobile or wearable) |
|||
<tizen:allow-navigation> (in mobile or wearable) |
|||
<tizen:app-control> (in mobile or wearable) |
|||
<tizen:src> |
|||
<tizen:operation> |
|||
<tizen:uri> |
|||
<tizen:mime> |
|||
<tizen:privilege> |
|||
<tizen:app-widget> (in wearable only) |
|||
<tizen:widget-label> |
|||
<tizen:widget-content> |
|||
<tizen:widget-size> |
|||
<tizen:widget-metadata> |
|||
<tizen:appdefined-privilege> (in mobile or wearable) |
|||
<tizen:application> (in mobile or wearable) |
|||
<author> |
|||
<span> |
|||
<tizen:background-category> (in mobile or wearable) |
|||
<tizen:category> (in wearable only) |
|||
<content> |
|||
<tizen:content> (in mobile or wearable) |
|||
<tizen:content-security-policy> (in mobile or wearable) |
|||
<tizen:content-security-policy-report-only> (in mobile or wearable) |
|||
<description> |
|||
<span> |
|||
<feature> (in mobile or wearable) |
|||
<param> |
|||
<icon> |
|||
<tizen:ime> (in wearable only) |
|||
<tizen:uuid> |
|||
<tizen:languages> |
|||
<tizen:language> |
|||
<tizen:launch_screen> (in mobile or wearable) |
|||
<tizen:ls_default> |
|||
<tizen:ls_landscape> |
|||
<tizen:ls_portrait> |
|||
<license> |
|||
<span> |
|||
<tizen:metadata> (in mobile or wearable) |
|||
<name> |
|||
<span> |
|||
<preference> |
|||
<tizen:privilege> (in mobile or wearable) |
|||
<tizen:provides-appdefined-privilege> (in mobile or wearable) |
|||
<tizen:profile> (in mobile or wearable) |
|||
<tizen:service> (in wearable only) |
|||
<tizen:name> |
|||
<tizen:icon> |
|||
<tizen:content> |
|||
<tizen:description> |
|||
<tizen:metadata> |
|||
<tizen:category> |
|||
<tizen:setting> (in mobile or wearable) |
|||
<tizen:trust-anchor> (in mobile or wearable) |
Configuration elements
The following tables summarize the W3C configuration elements used in the config.xml
file of a web application. For more information on the W3C element details, see Widget packaging and XML Configuration (the details of the Tizen extending configuration elements are described in Extending Configuration Elements in Mobile Applications and Extending Configuration Elements in Wearable Applications). For a quick view of the element hierarchy, see Configuration Element Hierarchy.
<widget> element |
---|
Represents the root element of a configuration document.
Expected children:
Attributes:
|
<access> element |
---|
Used to control network access from within a web application and to request access to certain network resources from the user agent.
Attributes:
|
<author> element |
---|
Represents the person who created the web application.
Expected children: <span> and <text node> Attributes:
|
<content> element |
---|
Represents the boot-strapping mechanism used to point to the main file of the web application.
Attributes:
|
<description> element |
---|
Represents text describing the purpose of the web application.
Expected children: <span> and <text node> Attributes:
|
<icon> element |
---|
Represents the web application icon.
Attributes:
|
<license> element |
---|
Represents the license under which the web application is distributed.
Expected children: <span> and <text node> Attributes:
|
<name> element |
---|
Represents the web application name used, for example, in the application menu.
Expected children: <span> and <text node> Attributes:
|
<param> element |
---|
Used to declare parameters to be used with a feature in mobile and wearable applications.
Attributes:
|
<preference> element |
---|
Used to declare preferences as key-value pairs for the web application for use at runtime.
Attributes:
|
<span> element |
---|
Represents the generic container used mainly for internationalization.
Expected children: <span> and <text node> Attributes:
|
Extend configuration elements in mobile applications
The following sections show additional configuration elements used in the config.xml
file of a web application, but not included in the Widget packaging and XML Configuration guidelines. For a quick view of the entire element hierarchy, see Configuration Element Hierarchy.
NoteThe extension elements are denoted as though the
xmlns:tizen="http://tizen.org/ns/widgets"
namespace declaration is in effect.
The maximum length of the attribute and the element (except <tizen:metadata>
, W3C preference element) can be limited to 2048 bytes. In this case, leftover bytes are ignored.
Tizen account
<tizen:account/> element |
---|
Used to register account provider information.
Occurrences:
Expected children:
Attributes:
Example:
|
Tizen navigation policy
<tizen:allow-navigation/> element |
---|
Used to define a list of URL domains that are allowed to be navigated in using the web application.
Occurrences:
Example:
|
Tizen application control
<tizen:app-control/> element |
---|
Used to indicate that the web application can handle a specific operation with the specified MIME type and URI. For more information, see Application Information and Controls.
Occurrences:
Expected children:
Example:
|
Tizen app-defined privilege
<tizen:appdefined-privilege/> element |
---|
Used to get the required access privileges provided by a provider package.
Occurrences:
Attributes:
Example:
|
Tizen application ID
<tizen:application/> element |
---|
Used to uniquely identify a Tizen application.
Occurrences:
Attributes:
Example:
|
Tizen background category
<tizen:background-category/> element |
---|
Used to represent the category of an application that is allowed to run in the background.
Occurrences:
Attributes:
Example:
|
Tizen-hosted web application
<tizen:content/> element |
---|
Used to point to a document which is hosted on an external server and acts as the web application start page. The Tizen WRT allows the start page to be hosted on an external server.
If the start page is contained in the widget package, it is defined with the <content> W3C element. If both Occurrences:
Attributes:
Example:
|
Tizen content security policy
<tizen:content-security-policy/> element |
---|
Used to define an additional content security policy for a packaged or hosted application.
Occurrences:
Example:
|
Tizen content security policy report only
<tizen:content-security-policy-report-only/> element |
---|
Used to define an additional content security policy, for monitoring purposes, for a packaged or hosted application.
Occurrences:
Example:
|
Tizen feature
<feature/> element |
---|
Used to define hardware and software components for a Tizen application. This attribute is only used in the store for filtering purposes. It is ignored by the Web Runtime installation procedure.
Occurrences:
Attributes:
Example:
|
Tizen launch screen
<tizen:launch_screen/> element |
---|
Used to indicate the splash screen.
Occurrences:
Expected children:
Attributes:
Example:
|
Tizen metadata
<tizen:metadata/> element |
---|
Used to define metadata information shared with other web applications. The defined metadata can be accessed (read-only) through the Tizen Application API.
Occurrences:
Attributes:
Example:
|
Tizen privilege
<tizen:privilege/> element |
---|
Used to get the required API access privileges for a web application.
Occurrences:
Attributes:
Example:
|
Tizen provided app-defined privilege
<tizen:provides-appdefined-privilege/> element |
---|
Used to specify the app-defined access privileges provided by a provider package.
Occurrences:
Attributes:
Example:
|
Tizen profile
<tizen:profile/> element |
---|
Used to define the application profile.
Occurrences:
Attributes:
Example:
|
Tizen settings
<tizen:setting/> element |
---|
Used to define additional application settings.
Occurrences:
Attributes:
Example:
|
Tizen trust-anchor
<tizen:trust-anchor/> element |
---|
Used to assign your own SSL root certificates for the application's HTTPS communication.
Occurrences:
Attributes:
Example:
|
Extend configuration elements in wearable applications
The following sections show additional configuration elements used in the config.xml
file of a web application, but not included in the Widget packaging and XML Configuration guidelines. For a quick view of the entire element hierarchy, see Configuration Element Hierarchy.
NoteThe extension elements are denoted as though the
xmlns:tizen="http://tizen.org/ns/widgets"
namespace declaration is in effect.The maximum length of the attribute and the element (except
tizen:metadata
, W3C preference element) can be limited to 2048 bytes. In that case, leftover bytes are ignored.
Tizen account
<tizen:account/> element |
---|
Used to register account provider information.
Occurrences:
Expected children:
Attributes:
Example:
|
Tizen navigation policy
<tizen:allow-navigation/> element |
---|
Used to define a list of URL domains that are allowed to be navigated in using the web application.
Occurrences:
Example:
|
Tizen application control
<tizen:app-control/> element |
---|
Used to indicate that the web application can handle a specific operation with the specified MIME type and URI. For more information, see Application Information and Controls.
Occurrences:
Expected children:
Example:
|
Tizen web widget
<tizen:app-widget/> element |
---|
Used to define the basic information for a web widget.
Occurrences:
Expected children: Attributes:
Example:
|
<tizen:widget-label/> element |
---|
Used to define the name of the web widget.
Occurrences:
Attributes:
|
<tizen:widget-content/> element |
---|
Used to define the starting page of the web widget.
Occurrences:
Expected children: Attributes:
|
<tizen:widget-size/> element |
---|
Used to define the size of the web widget.
Occurrences:
Attributes:
|
<tizen:widget-metadata/> element |
---|
Used to define a (key, value) pair that can be read by a web widget through the WidgetService API. Its main use is to allow you to define a constant to be read by a web widget.
Occurrences:
Attributes:
|
Tizen app-defined privilege
<tizen:appdefined-privilege/> element |
---|
Used to get the required access privileges provided by a provider package.
Occurrences:
Attributes:
Example:
|
Tizen application ID
<tizen:application/> element |
---|
Used to uniquely identify a Tizen wearable application.
Occurrences:
Attributes:
Example:
|
Tizen background category
<tizen:background-category/> element |
---|
Used to represent the category of an application that is allowed to run in the background.
Occurrences:
Attributes:
Example:
|
Tizen category
<tizen:category/> element |
---|
Used to define the categories to which the service application belongs.
Occurrences:
Attributes:
Example:
|
Tizen content
<tizen:content/> element |
---|
Used to define a start page hosted on an external server.
Occurrences:
Attributes:
Example:
|
Tizen content security policy
<tizen:content-security-policy/> element |
---|
Used to define an additional content security policy for a packaged or hosted application.
Occurrences:
Example:
|
Tizen content security policy report only
<tizen:content-security-policy-report-only/> element |
---|
Used to define an additional content security policy, for monitoring purposes, for a packaged or hosted application.
Occurrences:
Example:
|
Tizen feature
<feature/> element |
---|
Used to define the hardware and software components for a Tizen wearable web application. This attribute is only used in the Samsung Apps for filtering purposes. It is ignored by the Web Runtime installation procedure.
Occurrences:
Attributes:
Example:
|
Tizen IME
<tizen:ime/> element |
---|
Used to define the properties of an IME (Input Method Editor) type application, which is used when you want to create your own keyboard module for the Tizen platform.
Occurrences:
Expected children:
Example:
|
<tizen:language/> element |
---|
Used to define the supported input language of the current IME type application.
Occurrences:
Example:
|
Tizen launch screen
<tizen:launch_screen/> element |
---|
Used to indicate the splash screen.
Occurrences:
Expected children:
Attributes:
Example:
|
Tizen metadata
<tizen:metadata/> element |
---|
Used to define metadata information shared with other web applications. The defined metadata can be accessed (read-only) through the Tizen Application API.
Occurrences:
Attributes:
Example:
|
Tizen privilege
<tizen:privilege/> element |
---|
Used to get the required API access privileges for the web application.
Occurrences:
Attributes:
Example:
|
Tizen provided app-defined privilege
<tizen:provides-appdefined-privilege/> element |
---|
Used to specify the app-defined access privileges provided by a provider package.
Occurrences:
Attributes:
Example:
|
Tizen profile
<tizen:profile/> element |
---|
Used to define the application profile.
Occurrences:
Attributes:
Example:
|
Tizen service
<tizen:service/> element |
---|
Used to define a web service application.
Occurrences:
Expected children:
Attributes:
Example:
|
<tizen:content/> element |
---|
Used to define the start page of the web service application.
Occurrences:
Attributes:
|
<tizen:name/> element |
---|
Used to define the name of the web service application.
Occurrences:
Attributes:
|
<tizen:icon/> element |
---|
Used to define the icon for the web service application.
Occurrences:
Attributes:
|
<tizen:description/> element |
---|
Used to define the description for the web service application.
Occurrences:
|
<tizen:metadata/> element |
---|
Used to define metadata information shared with other web applications. The defined metadata can be accessed (read-only) through the Tizen Application API.
Occurrences:
Attributes:
|
<tizen:category/> element |
---|
Used to define the categories that the service application belongs to.
Occurrences:
Attributes:
|
Tizen settings
<tizen:setting/> element |
---|
Used to define additional application settings.
Occurrences:
Attributes:
Example:
|
Tizen trust-anchor
<tizen:trust-anchor/> element |
---|
Used to assign your own SSL root certificates for the application's HTTPS communication.
Occurrences:
Attributes:
Example: <tizen:trust-anchor use-system-certs="false"/> |