Home Mobile Tizen Cookbook

Tizen Cookbook

By Leon Anavi
books-svg-icon Book
eBook $28.99 $19.99
Print $48.99
Subscription $15.99 $10 p/m for three months
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
eBook $28.99 $19.99
Print $48.99
Subscription $15.99 $10 p/m for three months
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
About this book
Publication date:
October 2014
Publisher
Packt
Pages
350
ISBN
9781783981908

   

The first step of starting Tizen application development is to download the Tizen SDK and install it. The installation is similar on all supported operating systems. This recipe explains the basics of the installation process of Tizen SDK 2.2.1. Details and notes of each of the supported operating systems are discussed in the subsequent recipes of this chapter.

Getting ready

The SDK contains all the tools required for the development of both native and web Tizen applications. It consists of an IDE based on Eclipse, Emulator, Simulator for web applications, a tool chain, several sample applications, and full documentation. The Tizen SDK is
How to do it...

For
How it works…

The Tizen IDE is based on Eclipse. Most of the source code of Eclipse is written using the Java programming language. In general, the main advantage of applications created with Java is that they are compatible with different platforms, and this is the main reason why the Tizen IDE and SDK work fine on several desktop operating systems. See also

For details about the installation on Windows, Mac OS, and Ubuntu, please refer to the subsequent recipes of this chapter.
Getting ready

It is recommended to ensure that your development system matches the requirements of the Tizen SDK before proceeding with the installation. The Tizen SDK is compatible with the 32-bit and 64-bit versions of Windows 7, as well as with the 32-bit version of Windows XP. Although Windows 8 is not officially listed among the supported platforms, the version for Windows 7 should be compatible with it. How to do it...

The installation of the See also

After the installation, it might be convenient to register the Tizen SDK installation directory in the environmental path of Windows so that you will be able to directly run SDB from any location. Please refer to the recipes related to SDB for instructions on how to do this.

One of the reasons a lot of mobile application developers use Mac OS is that it is required for the development of iOS applications. Unlike iOS, the development tools for Tizen do not have such limitations, and they can be installed on Mac OS as well as other popular desktop operating systems.

Download the .dmg file and launch it by following the provided instructions in the recipe Installing the Tizen SDK.

If you plan to develop native Tizen applications on Mac OS X, install command-line tools following the Apple guidelines for the version of Mac OS X that you are using (https://developer.apple.com/library/ios/technotes/tn2339/_index.html).

On Mac OS X 10.7.5 (also known as Mac OS X Lion) or later, the Install Manager might fail due to the security settings of the operating system. These settings have to be modified to temporarily prevent the Mac OS X Gatekeeper from blocking the Install Manager and to allow you to proceed with the Tizen SDK installation. Please perform the following steps to configure Gatekeeper on Mac OS X and to solve the issue:

Getting ready

The network installation manager of the Tizen SDK for Mac OS is distributed as a standard disk image with the dmg extension.

Download the .dmg file and launch it by following the provided instructions in the recipe Installing the Tizen SDK.

If you plan to develop native Tizen applications on Mac OS X, install command-line tools following the Apple guidelines for the version of Mac OS X that you are using (https://developer.apple.com/library/ios/technotes/tn2339/_index.html).

On Mac OS X 10.7.5 (also known as Mac OS X Lion) or later, the Install Manager might fail due to the security settings of the operating system. These settings have to be modified to temporarily prevent the Mac OS X Gatekeeper from blocking the Install Manager and to allow you to proceed with the Tizen SDK installation. Please perform the following steps to configure Gatekeeper on Mac OS X and to solve the issue:

How to do it...

Download the .dmg file and launch it by following the provided instructions in the recipe Installing the Tizen SDK.

If you plan to develop native Tizen applications on Mac OS X, install command-line tools following the Apple guidelines for the See also

If you are interested in adding SDB to the environment path after successful installation of the Tizen SDK, refer to the recipes related to SDB.

Ubuntu is the only Linux distribution that is recommended and fully supported by the Tizen SDK. Additional software has to be installed prior to launching the Tizen SDK Install Manager on Ubuntu.

This recipe contains four major steps to install all the required software components and successfully complete the SDK installation on Ubuntu. Before you start, make sure that at least 6 GB free space is present on the computer.

The full installation process can be divided into four milestones:

Visit tizen.org to get the Tizen SDK or just execute the following commands to download Tizen SDK 2.2.1 using your web browser or command-line tool such as wget. For example, if you have a 32-bit version of Ubuntu, then you can run the following command in the terminal:

wget https://cdn.download.tizen.org/sdk/InstallManager/tizen-sdk-2.2.1/tizen-sdk-ubuntu32-v2.2.71.bin

The URL of the installation file for the 64-bit version is slightly different, so it can be downloaded by executing the following command:

wget https://cdn.download.tizen.org/sdk/InstallManager/tizen-sdk-2.2.1/tizen-sdk-ubuntu64-v2.2.71.bin

Oracle JRE must be installed before launching the Tizen SDK.Please note that OpenJDK is not supported. Please follow these steps if you do not have Oracle JRE installed:

Furthermore, Java can be enabled for the Mozilla Firefox web browser that is shipped as the default web browser for Ubuntu. A couple of additional steps must be executed:

We are almost ready to launch the Tizen SDK installer, but before that, some dependencies must be installed.

Ensure that the following packages are installed:

If you are wondering whether a package has already been installed on your development platform, please check it by executing the command dpkg -s followed by the package's name or the list of packages. To install any of the packages from the preceding list, open a terminal and execute sudo apt-get install followed by the name of the package, as follows:

Users of Ubuntu 12.10 or any older version should install the package gksudo as well by executing the following command:

Please note that if you are using Ubuntu 13.04 or a newer version, you will not be able to install this package as it is not available any more. Instead, you should install package gksu by executing the following command:

Finally, it is time to proceed with the installation of the Tizen SDK. Make sure that the binary file of the Install Manager has executable permissions and launch it. Please note that <version> and <bits> must be replaced with values that match the file downloaded at the beginning of the tutorial:

When the Install Manager launches, follow the instructions from the Installing the Tizen SDK recipe to complete the installation.

If you are unsure which install type is appropriate for your needs, it is recommended that you select Typical.

In this section, you will learn how to troubleshoot your GNU/Linux installation of Tizen.

Getting ready

Officially, Tizen SDK 2.2.1 is compatible only with two versions of Ubuntu: 12.04 and 12.10. Despite this, it is absolutely possible to install and run the SDK on newer versions too. This is applicable to the following versions of Ubuntu:

12.10 32-bit
13.04 32-bit
13.10 64-bit

Although Ubuntu 13.10 is not officially supported, the Tizen SDK can be installed successfully on it as well, but a workaround related to libudev.so.1 should be applied to run SDB. Please check the troubleshooting section of the recipe for more information about fixing SDB on Ubuntu 13.10.

The full installation process can be divided into four milestones:

Visit tizen.org to get the Tizen SDK or just execute the following commands to download Tizen SDK 2.2.1 using your web browser or command-line tool such as wget. For example, if you have a 32-bit version of Ubuntu, then you can run the following command in the terminal:

wget https://cdn.download.tizen.org/sdk/InstallManager/tizen-sdk-2.2.1/tizen-sdk-ubuntu32-v2.2.71.bin

The URL of the installation file for the 64-bit version is slightly different, so it can be downloaded by executing the following command:

wget https://cdn.download.tizen.org/sdk/InstallManager/tizen-sdk-2.2.1/tizen-sdk-ubuntu64-v2.2.71.bin

Oracle JRE must be installed before launching the Tizen SDK.Please note that OpenJDK is not supported. Please follow these steps if you do not have Oracle JRE installed:

Furthermore, Java can be enabled for the Mozilla Firefox web browser that is shipped as the default web browser for Ubuntu. A couple of additional steps must be executed:

We are almost ready to launch the Tizen SDK installer, but before that, some dependencies must be installed.

Ensure that the following packages are installed:

If you are wondering whether a package has already been installed on your development platform, please check it by executing the command dpkg -s followed by the package's name or the list of packages. To install any of the packages from the preceding list, open a terminal and execute sudo apt-get install followed by the name of the package, as follows:

Users of Ubuntu 12.10 or any older version should install the package gksudo as well by executing the following command:

Please note that if you are using Ubuntu 13.04 or a newer version, you will not be able to install this package as it is not available any more. Instead, you should install package gksu by executing the following command:

Finally, it is time to proceed with the installation of the Tizen SDK. Make sure that the binary file of the Install Manager has executable permissions and launch it. Please note that <version> and <bits> must be replaced with values that match the file downloaded at the beginning of the tutorial:

When the Install Manager launches, follow the instructions from the Installing the Tizen SDK recipe to complete the installation.

If you are unsure which install type is appropriate for your needs, it is recommended that you select Typical.

In this section, you will learn how to troubleshoot your GNU/Linux installation of Tizen.

How to do it...

The full installation process can be divided into four milestones:

Downloading the Tizen SDK.
Installing Oracle Java Runtime Environment (JRE).
Installing dependencies.
Installing the Tizen SDK.

Visit

tizen.org to get the Tizen SDK or just execute the following commands to download Tizen SDK 2.2.1 using your web browser or command-line tool such as wget. For example, if you have a 32-bit version of Ubuntu, then you can run the following command in the terminal:

wget https://cdn.download.tizen.org/sdk/InstallManager/tizen-sdk-2.2.1/tizen-sdk-ubuntu32-v2.2.71.bin

The URL of the installation file for the 64-bit version is slightly different, so it can be downloaded by executing the following command:

wget https://cdn.download.tizen.org/sdk/InstallManager/tizen-sdk-2.2.1/tizen-sdk-ubuntu64-v2.2.71.bin

Oracle JRE must be installed before launching the Tizen SDK.Please note that OpenJDK is not supported. Please follow these steps if you do not have Oracle JRE installed:

Furthermore, Java can be enabled for the Mozilla Firefox web browser that is shipped as the default web browser for Ubuntu. A couple of additional steps must be executed:

We are almost ready to launch the Tizen SDK installer, but before that, some dependencies must be installed.

Ensure that the following packages are installed:

If you are wondering whether a package has already been installed on your development platform, please check it by executing the command dpkg -s followed by the package's name or the list of packages. To install any of the packages from the preceding list, open a terminal and execute sudo apt-get install followed by the name of the package, as follows:

Users of Ubuntu 12.10 or any older version should install the package gksudo as well by executing the following command:

Please note that if you are using Ubuntu 13.04 or a newer version, you will not be able to install this package as it is not available any more. Instead, you should install package gksu by executing the following command:

Finally, it is time to proceed with the installation of the Tizen SDK. Make sure that the binary file of the Install Manager has executable permissions and launch it. Please note that <version> and <bits> must be replaced with values that match the file downloaded at the beginning of the tutorial:

When the Install Manager launches, follow the instructions from the Installing the Tizen SDK recipe to complete the installation.

If you are unsure which install type is appropriate for your needs, it is recommended that you select Typical.

In this section, you will learn how to troubleshoot your GNU/Linux installation of Tizen.

There's more…

In this section, you will learn how to troubleshoot

your GNU/Linux installation of Tizen.

See also

Please refer to the Getting started with Smart Development Bridge recipe about SDB if you are interested in registering SDB as a global command.
For up-to-date information, please refer to the Tizen

Tizen is an open source software platform and it is very flexible. Third-party individual developers or companies can develop extension packages for the Tizen SDK. Other developers can use and abuse third-party packages in their applications using specific repositories. Some extensions for the Tizen SDK are available at https://developer.tizen.org/downloads/add-on-sdks.

How to do it...

Please perform the following steps to add extra repositories and install additional packages:

Launch the Tizen SDK Install Manager.
Click on Next to proceed.
Select Extra Repository to open a dialog.
Click on Add.
Set an external server as well as the name of a repository and click on OK. The repository information will be displayed in the previous window. Click on OK again.
Select the required packages and click on Install.

Perform the How it works…

Each repository contains additional packages that are optional and can be added or deleted by the developer at any time. A repository is specified by a URL, so it is mandatory to have a network connection to the repository's server to download any of its packages. If you are experiencing issues connecting to a repository using HTTP Secure (HTTPS)

The default and recommended IDE that is included in the Tizen SDK is based on Eclipse. Eclipse is an open source software, and through the years it has become a de facto standard for the development of applications for mobile platforms. Developers with experience in Android, Bada, Symbian, and BlackBerry 10 are already familiar with Eclipse as it, or IDEs based on it, is used for application development for these platforms.

These are the most popular and important views in the Tizen IDE:

Getting ready

The first step of the journey into application development for Tizen starts with the launch of the Tizen IDE. It is based on Eclipse, so it is not a surprise that the Tizen IDE also asks you to select a workspace. If you do not want to be asked to select the workspace every time you start the IDE, just check the option Use this as default and do not ask again. To change the workspace when the Tizen IDE is running, just navigate to File | Switch Workspace.

A welcome screen will be displayed on the first start screen of the Tizen IDE. Click on Workbench to open the Tizen Web perspective and start developing applications. If you want to have a look at the documentation, select any of the other three options. You can get back to the home screen at any time by navigating to Help | Welcome. If you are searching for Tizen's

These are the most popular and important views in the Tizen IDE:

How to do it...

For a lot of developers, the look and feel of their IDE is a key factor for their productivity. Tizen IDE supports all customization options provided by Eclipse. This recipe contains only a few hints for customization of the background and text colors. For more information, please have a look at Tizen IDE and Eclipse documentation or just delve into the preferences.

Execute the following actions to change the background color of the text editor:

Navigate to Windows | Preferences and a dialog box will appear.
Navigate to General | Editors | Text Editors.
Adjust the background color from the list of Appearance color options.
Change the text colors.

Text colors depend on the syntax coloring of the programming languages. Tizen web applications are developed using HTML, CSS, and JavaScript, while the development of native mobile applications relies on C++. Follow these simple steps to change the syntax coloring:

Navigate to Windows | Preferences and a dialog box will appear.
Select the desired programming language and navigate to Editor | Syntax Coloring.
Adjust the colors.

Perform the following

These are the most popular and important views in the Tizen IDE:

There's more...

These are the most popular and important views in the

Tizen IDE:

It is mandatory to create and set a secure profile in order to successfully deploy and debug applications on a Tizen device. My personal observation is that a lot of developers experience issues due to the secure profile when they are deploying an application on a device for the first time. This recipe explains a couple of ways to generate a certificate and set it on the Tizen IDE.

Getting ready

If an Active Secure profile
How to do it...

The Active Secure profile can be created manually through the command line or using the integrated graphical user interface from the Tizen IDE.

The recommended way is to
How it works…

The creation process of the certificate is similar no matter which approach or operating system you prefer to use. Both the

Tizen Web Simulator is a simplified tool to test and debug web applications. It is included in the Tizen SDK. Web Simulator is available under Apache Software License v.2.0 because it is based on the Ripple-UI Framework, which was initially developed by BlackBerry (known in the past as research in motion) to test BB10 HTML5 WebWorks applications. Web Simulator offers the following features:

The Google Chrome web browser must be installed because it powers the Tizen Web Simulator. This actually means that HTML5 applications that run on Google Chrome will also be running on Tizen. Another benefit is that all development features of the Google Chrome browser are available in the simulator, including the Remote Inspector tool that can be accessed by pressing F12.

Getting ready

It is mandatory to download and install Google Chrome on the development system if you intend to test applications on Tizen Web Simulator. The installation path of the Google Chrome browser can be specified in the Preferences of the simulator. How to do it...

Three options are available to How it works…

Google Chrome will be started automatically with the Web Simulator. Adjust the orientation and zooming of the simulator by editing the configurations from the panel on the left-hand side of the browser.

Please note that the Web Simulator is compatible only with HTML5 web applications and it is useless for native applications. The simulator loads the HTML file specified at config.xml when the web application is launched. By default, the name of the file is index.html.

See also

Please refer to the recipes in
  • Chapter 11, Debugging Apps in Tizen, to learn how to simulate events and debug applications using the Web Simulator.

Although it is highly recommended to deploy and debug applications directly on a real Tizen device, it is not mandatory to have a Tizen device in order to develop applications. A virtual device Emulator is delivered along with the other tools of the Tizen SDK. Developers can create virtual machines with custom hardware specifications that match their requirements for testing.

The device Emulator is a virtual machine based on the open source project Quick Emulator (QEMU). It provides full stacks of the Tizen platform. Emulator Manager and Event Injector are also provided among the Emulator tools of the SDK. Unlike the simulator, the emulator provides strict implementation of the device specifications and there are no guest modifications. Please note that Tizen SDK 2.2.1 supports only the x86 machine architecture for guests.

QEMU, the engine behind the Tizen Emulator, is an open source project for a visualization machine that allows you to run a separate operating system as just another task on the desktop of your development machine. The Android emulator is also based on QEMU. For more information about QEMU and details regarding its licenses, please visit http://wiki.qemu.org/.

The Tizen Emulator supports a variety of features, and the most important features are as follows:

Of course, the emulator has some limitations compared to a real Tizen device. The differences impact the behavior of features:

Getting ready

Please ensure that you are running the Tizen Emulator on a computer with a minimum screen resolution of 1280 x 1024 pixels and the latest version of graphical drivers with OpenGL support. It is recommended to use an Intel CPU with
How to do it...

To create new instances of the
See also

You can communicate with the running Tizen emulator using Smart Development Bridge (SDB). For more information and details, please check the next recipe. Descriptions and examples of deploying and running applications on the emulator as well as simulating events with the Event Injector are available in

Smart Development Bridge (SDB) is a command-line tool for communication with the Tizen emulator or connected Tizen devices. Its role in Tizen is the same as the role of Android Debug Bridge (ADB) in Android. SDB is an essential part of the Tizen SDK and it is installed with it. SDB manages multiple device connections and provides basic commands for application development and debugging. The main features of SDB are as follows:

SDB works as a typical client-server application and it consists of three main components:

Although not mandatory, it is convenient to add SDB to the environmental path. To do it, follow the steps given in this recipe, depending on the operating system of your development machine.

To add SDB to the environmental path of Windows 7, perform the following steps:

If you are using Windows XP, the following steps will be helpful if you want to add SDB to the environmental path:

To add SDB to the environmental path for all users on Ubuntu, append the SDB directory to the path that is defined at file /etc/environment. Log out and log in again or just reboot to apply the changes.

To add SDB to the environmental path for all users on Mac OS X Leopard and above, create a text file at the directory /etc/paths.d/ and set the location of SDB within it using root privileges, for example, sudo -s 'echo "<tizen_sdk>/sdb" > /etc/paths.d/sdb'.

A quick and easy alternative approach to achieve a similar result on UNIX-like operating systems, such as Linux and Mac OS, without modifying /etc/environment or creating a file at /etc/paths.d is to create a symbolic link to SDB in the bin directory using root privileges, for example, sudo ln –s <tizen_sdk>/sdb /bin/sdb.

Please note that <tizen_sdk> in both examples must be replaced with the actual path, depending on the installation.

Getting ready

After successful installation of the Tizen SDK, SDB is located under tizen_sdk/SDK/sdb. To use the client, an SDB command must be executed within its directory unless the sdb location has been added to the environmental path variable.

To add SDB to the environmental path of Windows 7, perform the following steps:

If you are using Windows XP, the following steps will be helpful if you want to add SDB to the environmental path:

To add SDB to the environmental path for all users on Ubuntu, append the SDB directory to the path that is defined at file /etc/environment. Log out and log in again or just reboot to apply the changes.

To add SDB to the environmental path for all users on Mac OS X Leopard and above, create a text file at the directory /etc/paths.d/ and set the location of SDB within it using root privileges, for example, sudo -s 'echo "<tizen_sdk>/sdb" > /etc/paths.d/sdb'.

A quick and easy alternative approach to achieve a similar result on UNIX-like operating systems, such as Linux and Mac OS, without modifying /etc/environment or creating a file at /etc/paths.d is to create a symbolic link to SDB in the bin directory using root privileges, for example, sudo ln –s <tizen_sdk>/sdb /bin/sdb.

Please note that <tizen_sdk> in both examples must be replaced with the actual path, depending on the installation.

How to do it...

To add SDB to the

environmental path of Windows 7, perform the following steps:

If you are using Windows XP, the following steps will be helpful if you want to add SDB to the environmental path:

To add SDB to the environmental path for all users on Ubuntu, append the SDB directory to the path that is defined at file /etc/environment. Log out and log in again or just reboot to apply the changes.

To add SDB to the environmental path for all users on Mac OS X Leopard and above, create a text file at the directory /etc/paths.d/ and set the location of SDB within it using root privileges, for example, sudo -s 'echo "<tizen_sdk>/sdb" > /etc/paths.d/sdb'.

A quick and easy alternative approach to achieve a similar result on UNIX-like operating systems, such as Linux and Mac OS, without modifying /etc/environment or creating a file at /etc/paths.d is to create a symbolic link to SDB in the bin directory using root privileges, for example, sudo ln –s <tizen_sdk>/sdb /bin/sdb.

Please note that <tizen_sdk> in both examples must be replaced with the actual path, depending on the installation.

See also

Please have a look at the next recipe to learn how to use the full capabilities of SDB.

SDB is a powerful tool with a lot of capabilities and features. Although you can successfully develop applications using the Tizen IDE without even knowing what SDB is, it is recommended to explore the options of the tool. SDB is a developer's best friend when it comes to management of a connected device, transferring files, and debugging applications.

Perform the following steps to enable and use SDB:

According to the Tizen 2.2.1 official development guide, the values provided for option in the preceding command can be:

The following is a list of all the supported SDB commands with some brief information about them:

Command

Details

devices

This provides a list of connected devices.

connect <host>[:<port>]

This connects to a device through TCP/IP.

disconnect <host>[:<port>]

This disconnects a device. The host and port parameters are optional. If they are not specified, all devices will be disconnected.

push <local> <remote> [-with-utf8]

This transfers a file from the development system to the connected Tizen device.

pull <remote> [<local>]

This transfers a file from the connected Tizen device to the development system.

shell

This accesses a remote shell of the connected Tizen device or emulator.

shell <command>

This remotely runs a single shell command to a connected Tizen device or emulator. Execution of the following commands is allowed: ls, rm, mv, cd, mkdir, cp, touch, echo, tar, grep, cat, chmod, rpm, find, uname, netstat, and killall.

dlog [option] [<filter-spec>]

This prints the current log out of the buffers of a connected device or emulator.

install <path_to_tpk>

This installs a tpk package.

uninstall <appid>

This uninstalls an application using its ID.

forward <local> <remote>

This specifies the local and remote socket to configure port forwarding.

help

This displays SDB help information and usage guides.

version

This prints the SDB version number.

start-server

This launches the SDB server if it is not already running.

kill-server

This terminates the SDB server if it is running.

get-state

This displays the status of the connection to devices.

get-serialno

This displays the serial number of a connected Tizen device.

status-window

This displays the status of a connected device until the developer manually terminates the command.

root <on|off>

This enables or disables the root account mode.

Android developers will be happy to find out a lot of similarities between Tizen Smart Development Bridge and Android Debug Bridge. Similar names of both tools is not a coincidence. Both tools have common purposes. Most of the commands are executed using the same keywords on both platforms and have similar behavior.

The following are several use cases of SDB commands:

How to do it...

Perform the following steps to enable and use SDB:

Make sure that the

According to the Tizen 2.2.1 official development guide, the values provided for option in the preceding command can be:

The following is a list of all the supported SDB commands with some brief information about them:

Command

Details

devices

This provides a list of connected devices.

connect <host>[:<port>]

This connects to a device through TCP/IP.

disconnect <host>[:<port>]

This disconnects a device. The host and port parameters are optional. If they are not specified, all devices will be disconnected.

push <local> <remote> [-with-utf8]

This transfers a file from the development system to the connected Tizen device.

pull <remote> [<local>]

This transfers a file from the connected Tizen device to the development system.

shell

This accesses a remote shell of the connected Tizen device or emulator.

shell <command>

This remotely runs a single shell command to a connected Tizen device or emulator. Execution of the following commands is allowed: ls, rm, mv, cd, mkdir, cp, touch, echo, tar, grep, cat, chmod, rpm, find, uname, netstat, and killall.

dlog [option] [<filter-spec>]

This prints the current log out of the buffers of a connected device or emulator.

install <path_to_tpk>

This installs a tpk package.

uninstall <appid>

This uninstalls an application using its ID.

forward <local> <remote>

This specifies the local and remote socket to configure port forwarding.

help

This displays SDB help information and usage guides.

version

This prints the SDB version number.

start-server

This launches the SDB server if it is not already running.

kill-server

This terminates the SDB server if it is running.

get-state

This displays the status of the connection to devices.

get-serialno

This displays the serial number of a connected Tizen device.

status-window

This displays the status of a connected device until the developer manually terminates the command.

root <on|off>

This enables or disables the root account mode.

Android developers will be happy to find out a lot of similarities between Tizen Smart Development Bridge and Android Debug Bridge. Similar names of both tools is not a coincidence. Both tools have common purposes. Most of the commands are executed using the same keywords on both platforms and have similar behavior.

The following are several use cases of SDB commands:

See also

The information provided by the log buffers of a device might be valuable during the debugging of Tizen applications. More details and advanced usage examples of sdb dlog are available in
 

In this chapter, we will cover:

The ecosystem and communities are essential for every open source project, and Tizen is no exception. Tizen is the OS of everything. It targets different devices, form factors, and CPU architectures, so it is a flexible software platform that can be used for multiple purposes.

Tizen can run on devices with ARM- or i586-compatible processors. The first commercially available Tizen device is the Samsung camera NX300. In 2014, Samsung also launched several smart watches with Tizen, and Intel manufactured the mini PC NUC. Please explore the last chapter of the book if you are interested in booting Tizen on various hardware devices or even building your own device.

Three types of installable applications are supported by Tizen:

This chapter contains information about the life cycle of Tizen applications, an overview of the development tools, and technologies as well as guides to publishing and selling applications through Tizen Store. It is an excellent getting started guide to publishing your first Tizen application.

The Tizen SDK provides tools to turn good ideas into excellent applications and to publish them to Tizen Store. The life cycle of Tizen applications is similar to the life cycle of mobile applications for Android and iOS, and it includes the steps described in the following section.

  1. Come up with a good idea.

    A good idea lies behind each great mobile application. All you need is inspiration, but unfortunately, as far as I know, there are no strict rules, standards, or algorithms, so you have to think out of the box.

  2. Design the application user interface (UI) and implement the backend.

    The user interface and the user experience are the key factors that convert a good idea into an exceptional application with a lot of downloads. Plan the development road map of the application carefully, and select the best approach for implementation. If your application communicates with a web service, wisely distribute the load between the mobile application and the server to achieve optimal performance. UML diagrams might help you to prepare well before you start coding. Always remember that a good plan can save you a lot of time during development.

  3. Build a Tizen application.

    The Tizen IDE provides the tools required for easy building of a Tizen application with a single click. Before you start the build, you have to configure its settings. Navigate to Project | Build Configuration to manage the available build settings. After that, you can build the application at any appropriate time by hitting F10 or navigating to Project | Build Project.

  4. Debug the Tizen application.

    Try out the application on a Tizen device and emulator to verify that it is working as expected. Testing is very important, because even a minor bug can irritate users, and they might stop using your application.

  5. Package the application.

    All files of the application have to be bundled into a package that can be installed on Tizen devices. The file extension of the package is .tpk for native applications and .wgt for web applications.

  6. Certify the application and publish it to Tizen Store.

    The final step is to release your app to the market. The easiest way to reach millions of users from around the world is to distribute your application through application stores, such as the official Tizen Store.

Tizen is open, and so is its ecosystem. Tizen Store is the official store that is maintained by Samsung, but you can publish your applications to other stores too. If you wish, you can even create your own store.

Getting ready

The life cycle of an application for Tizen can be divided into six major steps as shown in the following diagram:

Getting ready

Tizen application life cycle

The development of
  1. Come up with a good idea.

    A good idea lies behind each great mobile application. All you need is inspiration, but unfortunately, as far as I know, there are no strict rules, standards, or algorithms, so you have to think out of the box.

  2. Design the application user interface (UI) and implement the backend.

    The user interface and the user experience are the key factors that convert a good idea into an exceptional application with a lot of downloads. Plan the development road map of the application carefully, and select the best approach for implementation. If your application communicates with a web service, wisely distribute the load between the mobile application and the server to achieve optimal performance. UML diagrams might help you to prepare well before you start coding. Always remember that a good plan can save you a lot of time during development.

  3. Build a Tizen application.

    The Tizen IDE provides the tools required for easy building of a Tizen application with a single click. Before you start the build, you have to configure its settings. Navigate to Project | Build Configuration to manage the available build settings. After that, you can build the application at any appropriate time by hitting F10 or navigating to Project | Build Project.

  4. Debug the Tizen application.

    Try out the application on a Tizen device and emulator to verify that it is working as expected. Testing is very important, because even a minor bug can irritate users, and they might stop using your application.

  5. Package the application.

    All files of the application have to be bundled into a package that can be installed on Tizen devices. The file extension of the package is .tpk for native applications and .wgt for web applications.

  6. Certify the application and publish it to Tizen Store.

    The final step is to release your app to the market. The easiest way to reach millions of users from around the world is to distribute your application through application stores, such as the official Tizen Store.

Tizen is open, and so is its ecosystem. Tizen Store is the official store that is maintained by Samsung, but you can publish your applications to other stores too. If you wish, you can even create your own store.

How to do it...

Come up with a good idea.

A good idea lies behind each great mobile application. All you need is inspiration, but unfortunately, as far as I know, there are no strict rules, standards, or algorithms, so you have to think out of the box.

Design the application user interface (UI) and implement the backend.

The user interface and the user experience are the key factors that convert a good idea into an exceptional application with a lot of downloads. Plan the development road map of the application carefully, and select the best approach for implementation. If your application communicates with a web service, wisely distribute the load between the mobile application and the server to achieve optimal performance. UML diagrams might help you to prepare well before you start coding. Always remember that a good plan can save you a lot of time during development.

Build a Tizen application.

The Tizen IDE provides the tools required for easy building of a Tizen application with a single click. Before you start the build, you have to configure its settings. Navigate to Project | Build Configuration to manage the available build settings. After that, you can build the application at any appropriate time by hitting F10 or navigating to Project | Build Project.

Debug the See also

Tutorials and examples about

Web application development has been part of the Tizen project since its initial release. It is the recommended approach for application development on the platform. Millions of developers are already familiar with the basics of web development, so they can easily start developing applications for Tizen.

Tizen SDK provides all the tools necessary for development of Tizen web and hybrid applications. A web application contains HTML, CSS, and JavaScript files that are combined in a package with the extension .wgt. A hybrid application combines a web application with one or more native service applications.

  1. Launch the Tizen IDE, and if asked, choose a workspace.
  2. Navigate to File | New | Tizen Web Project.
  3. A wizard to create the project of the Tizen web application will appear. From Template select Tizen Web UI Framework and Single Page Application. Enter a project name, for example, hello. When you are ready, click on Finish.
  4. Navigate to config.xml from Project Explorer, and open it using Widget Configuration Editor. By default, a double-click should open the file in Widget Configuration Editor. If not, place the mouse over the file, click on the right button, and select this option from Open with.
  5. Open the Overview tab, and change the name to HelloWorld. This way, the name of the application will be different from the name of the project.
  6. From Project Explorer, open index.html, replace its content with the following source code, and save the changes:
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8"/>
        <meta name="description" content="Hello World!"/>
        <meta name="viewport" content="width=device-width,user-scalable=no"/>
        <title>Hello World!</title>
        <link rel="stylesheet" href="tizen-web-ui-fw/latest/themes/tizen-white/tizen-web-ui-fw-theme.css" name="tizen-theme"/>
        <script src="tizen-web-ui-fw/latest/js/jquery.js"></script>
        <script src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"></script>
        <script src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js"
            data-framework-theme="tizen-white"></script>
        <script type="text/javascript" src="./js/main.js"></script>
        <link rel="stylesheet" type="text/css" href="./css/style.css"/>
    </head>
    <body>
        <div data-role="page">
            <div data-role="header" data-position="fixed">
                <h1>Tizen Cookbook</h1>
            </div>
    
            <div data-role="content">
              <p>Hello World!</p>
            </div>
            <div data-role="footer" data-position="fixed">
                <h4>Packt Publishing</h4>
            </div>
        </div>
    </body>
    </html>
  7. Save all files.
  8. Make sure that a Tizen device with the developer mode enabled is connected or Emulator is running. If you are unsure how to enable the developer mode, have a look at the recipe Using Smart Development Bridge from the previous chapter.
  9. Select the project of the application from Project View, right-click on it, and from the menu that appears, navigate to Run as | Tizen Web Application. As an alternative, you can just hit the run button to deploy and launch the application.

Upon creating a new project, the Tizen IDE automatically generates the directory structure and creates files if a template is selected.

All configurations and permissions of the application are set at the XML file config.xml. The Tizen IDE provides means to simplify the editing process of the file. The name, the identifier, the version, the icon file, as well as the entry file, which is index.html by default, are among the configurations stored in config.xml. Access to sensitive APIs should also be set by describing privileges at this file if the application uses such sensitive APIs.

Several JavaScripts and CSSes are included using the following HTML code to make sure that the application is compatible with Tizen WRT and use the standard Tizen look and feel:

The file js/main.js will be generated by the IDE, and it will contain the JavaScript source code for initialization of the application and for the handling of the back hardware button. Pay attention to the fact that jQuery is also included because the Tizen Web UI framework is based on jQuery Mobile.

If you have any trouble creating a Hello World application from scratch, use the example provided with the book.

Getting ready

Web applications are installed and executed as standalone applications on Tizen, thanks to the
  1. Launch the Tizen IDE, and if asked, choose a workspace.
  2. Navigate to File | New | Tizen Web Project.
  3. A wizard to create the project of the Tizen web application will appear. From Template select Tizen Web UI Framework and Single Page Application. Enter a project name, for example, hello. When you are ready, click on Finish.
  4. Navigate to config.xml from Project Explorer, and open it using Widget Configuration Editor. By default, a double-click should open the file in Widget Configuration Editor. If not, place the mouse over the file, click on the right button, and select this option from Open with.
  5. Open the Overview tab, and change the name to HelloWorld. This way, the name of the application will be different from the name of the project.
  6. From Project Explorer, open index.html, replace its content with the following source code, and save the changes:
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8"/>
        <meta name="description" content="Hello World!"/>
        <meta name="viewport" content="width=device-width,user-scalable=no"/>
        <title>Hello World!</title>
        <link rel="stylesheet" href="tizen-web-ui-fw/latest/themes/tizen-white/tizen-web-ui-fw-theme.css" name="tizen-theme"/>
        <script src="tizen-web-ui-fw/latest/js/jquery.js"></script>
        <script src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"></script>
        <script src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js"
            data-framework-theme="tizen-white"></script>
        <script type="text/javascript" src="./js/main.js"></script>
        <link rel="stylesheet" type="text/css" href="./css/style.css"/>
    </head>
    <body>
        <div data-role="page">
            <div data-role="header" data-position="fixed">
                <h1>Tizen Cookbook</h1>
            </div>
    
            <div data-role="content">
              <p>Hello World!</p>
            </div>
            <div data-role="footer" data-position="fixed">
                <h4>Packt Publishing</h4>
            </div>
        </div>
    </body>
    </html>
  7. Save all files.
  8. Make sure that a Tizen device with the developer mode enabled is connected or Emulator is running. If you are unsure how to enable the developer mode, have a look at the recipe Using Smart Development Bridge from the previous chapter.
  9. Select the project of the application from Project View, right-click on it, and from the menu that appears, navigate to Run as | Tizen Web Application. As an alternative, you can just hit the run button to deploy and launch the application.

Upon creating a new project, the Tizen IDE automatically generates the directory structure and creates files if a template is selected.

All configurations and permissions of the application are set at the XML file config.xml. The Tizen IDE provides means to simplify the editing process of the file. The name, the identifier, the version, the icon file, as well as the entry file, which is index.html by default, are among the configurations stored in config.xml. Access to sensitive APIs should also be set by describing privileges at this file if the application uses such sensitive APIs.

Several JavaScripts and CSSes are included using the following HTML code to make sure that the application is compatible with Tizen WRT and use the standard Tizen look and feel:

The file js/main.js will be generated by the IDE, and it will contain the JavaScript source code for initialization of the application and for the handling of the back hardware button. Pay attention to the fact that jQuery is also included because the Tizen Web UI framework is based on jQuery Mobile.

If you have any trouble creating a Hello World application from scratch, use the example provided with the book.

How to do it...

Launch the Tizen IDE, and if asked, choose a workspace.
Navigate to File | New | Tizen Web Project.
A wizard to create the project of the Tizen web application will appear. From Template select Tizen Web UI Framework and Single Page Application. Enter a project name, for example, hello. When you are ready, click on Finish.
Navigate to config.xml from Project Explorer, and open it using Widget Configuration Editor. By default, a double-click should open the file in Widget Configuration Editor. If not, place the mouse over the file, click on the right button, and select this option from Open with.
Open the Overview tab, and change the name to HelloWorld. This way, the name of the
  1. application will be different from the name of the project.
  2. From Project Explorer, open index.html, replace its content with the following source code, and save the changes:
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8"/>
        <meta name="description" content="Hello World!"/>
        <meta name="viewport" content="width=device-width,user-scalable=no"/>
        <title>Hello World!</title>
        <link rel="stylesheet" href="tizen-web-ui-fw/latest/themes/tizen-white/tizen-web-ui-fw-theme.css" name="tizen-theme"/>
        <script src="tizen-web-ui-fw/latest/js/jquery.js"></script>
        <script src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"></script>
        <script src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js"
            data-framework-theme="tizen-white"></script>
        <script type="text/javascript" src="./js/main.js"></script>
        <link rel="stylesheet" type="text/css" href="./css/style.css"/>
    </head>
    <body>
        <div data-role="page">
            <div data-role="header" data-position="fixed">
                <h1>Tizen Cookbook</h1>
            </div>
    
            <div data-role="content">
              <p>Hello World!</p>
            </div>
            <div data-role="footer" data-position="fixed">
                <h4>Packt Publishing</h4>
            </div>
        </div>
    </body>
    </html>
  3. Save all files.
  4. Make sure that a Tizen device with the developer mode enabled is connected or Emulator is running. If you are unsure how to enable the developer mode, have a look at the recipe Using Smart Development Bridge from the previous chapter.
  5. Select the project of the application from Project View, right-click on it, and from the menu that appears, navigate to Run as | Tizen Web Application. As an alternative, you can just hit the run button to deploy and launch the application.

Upon creating a new project, the Tizen IDE automatically generates the directory structure and creates files if a template is selected.

All configurations and permissions of the application are set at the XML file config.xml. The Tizen IDE provides means to simplify the editing process of the file. The name, the identifier, the version, the icon file, as well as the entry file, which is index.html by default, are among the configurations stored in config.xml. Access to sensitive APIs should also be set by describing privileges at this file if the application uses such sensitive APIs.

Several JavaScripts and CSSes are included using the following HTML code to make sure that the application is compatible with Tizen WRT and use the standard Tizen look and feel:

The file js/main.js will be generated by the IDE, and it will contain the JavaScript source code for initialization of the application and for the handling of the back hardware button. Pay attention to the fact that jQuery is also included because the Tizen Web UI framework is based on jQuery Mobile.

If you have any trouble creating a Hello World application from scratch, use the example provided with the book.

How it works…

Upon creating a new project, the Tizen IDE automatically generates the directory structure and creates files if a template is selected.

All configurations and permissions of the application are set at the XML file config.xml. The Tizen IDE provides means to simplify the editing process of the file. The name, the identifier, the version, the icon file, as well as the entry file, which is index.html by default, are among the configurations stored in config.xml. Access to sensitive APIs should also be set by describing privileges at this file if the application uses such sensitive APIs.

Several JavaScripts and CSSes are included using the following HTML code to make sure that the application is compatible with Tizen WRT and use the standard Tizen look and feel:

<link rel="stylesheet" href="tizen-web-ui-fw/latest/themes/tizen-white/tizen-web-ui-fw-theme.css" name="tizen-theme"/> <script src="tizen-web-ui-fw/latest/js/jquery.js"></script> <script src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"></script> <script src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" data-framework-theme="tizen-white"></script> <script type="text/javascript" src="./js/main.js"></script>

The file js/main.js will be generated by the IDE, and it will contain the JavaScript source code for initialization of the application and for the handling of the back hardware button. Pay attention to the fact that jQuery is also included because the Tizen Web UI framework is based on jQuery Mobile.

If you have any trouble creating a Hello World application from scratch, use the example provided with the book. See also

More examples and advanced tutorials related to web applications for Tizen are available in the chapters from the second part of the book.

Tizen provides a collection of APIs following the specification of W3C/HTML5 and the nonprofit industry consortium to create the open standards Khronos. A set of additional APIs that provide access to specific hardware and software capabilities of the devices are also provided. These APIs are based on JavaScript, and this programming language must be used to take advantage of the APIs.

The Tizen platform provides the following JavaScript-based APIs for development of web applications:

Launch the Tizen IDE and create a new project for Tizen web application, and append the privileges required for the API that you plan to use for config.xml, for example, http://tizen.org/privilege/alarm.

Take, for instance, the following JavaScript code, which demonstrates the simple usage of the Alarm and Application APIs:

// Get the ID of the current application
var sAppId = tizen.application.getCurrentApplication().appInfo.id;

// Set an alarm which will occur after couple of hours
var myAlarm = new tizen.AlarmRelative(2 * tizen.alarm.PERIOD_HOUR);
if (null != myAlarm) {
  tizen.alarm.add(myAlarm, sAppId);
}
Getting ready

The Tizen platform provides the following JavaScript-based APIs for development of web applications:

Alarm: This

Launch the Tizen IDE and create a new project for Tizen web application, and append the privileges required for the API that you plan to use for config.xml, for example, http://tizen.org/privilege/alarm.

Take, for instance, the following JavaScript code, which demonstrates the simple usage of the Alarm and Application APIs:

// Get the ID of the current application
var sAppId = tizen.application.getCurrentApplication().appInfo.id;

// Set an alarm which will occur after couple of hours
var myAlarm = new tizen.AlarmRelative(2 * tizen.alarm.PERIOD_HOUR);
if (null != myAlarm) {
  tizen.alarm.add(myAlarm, sAppId);
}
How to do it…

Launch the Tizen IDE and create a new project for Tizen web application, and append the privileges required for the API that you plan to use for config.xml, for example, How it works…

All additional device APIs that are used in web applications for Tizen are accessed through the tizen JavaScript object. A set of generic functions, including error handling and filters, is also provided with the tizen object.

The Application API See also

This chapter contains only a brief overview of the available APIs. Tutorials and examples for most of them are available in the chapters from the second part of the book.

Internationalization and localization of your applications to different languages is a key factor for success. Localized content attracts the attention of a larger audience, which leads to more downloads, and, of course, better revenues.

Internationalization is the process of designing the application in such a way that various languages are supported. Localization is another process of adding specific local resources to the application, such as text translated to different languages.

In this recipe, you will learn how to a support multiple languages inside the Tizen web application using a folder-based technique for localization.

How to do it...

Perform the following steps to localize a Tizen application:

Open the application's project, and select its root folder at Project View.
From the main menu of the Tizen IDE, navigate to Project | Localization | Localization Wizard... as shown in the following screenshot:
How to do it...

Launching Localization Wizard

On the first screen of
How it works…

Localization Wizard creates a folder called locales at the root level of the application package and creates separate folders in it for each selected locale. All files that have been chosen for localization of the selected locale will be included in its folder. For example, if we decide to create the French localization of index.html, then the folder /locales/fr will be created and the file will be copied in it.

If a file is not selected for localization, it will not appear in the locales folder, and its original version from the root level of the package will be automatically loaded.

When a web application is launched, Tizen will try to load the content using the current locale, which is configured by the user at the platform settings. If such a locale is not present, then the application will be loaded using its default localization. There's more...

In Tizen web applications, dynamic string localization using JavaScript is also possible, thanks to the open source library, Globalize. Perform the following steps to enable and use this library:

Define translation tables for each supported language. For example, the following code snippet defines the default language (English) and French:
Globalize.addCultureInfo("default", {
  messages: {
    "hello" : "Hello"
  }
});

Globalize.addCultureInfo("fr", {
  messages: {
    "hello" : "Bonjour"
  }
});
Use a translation string with automatic or manual language selection as follows:
console.log(Globalize.localize("hello"));
console.log(Globalize.localize("hello", "fr"));

Pay attention to the fact

After the successful development and testing of a web application, all of its files must be bundled together into a single file called package that has the extension .wgt. The package contains all the HTML, CSS, JavaScript, and any other resource files of the application. The .wgt file is used to install web applications on Tizen devices and should be uploaded to Tizen Store when the application is published.

The package produced by the Tizen IDE is created according to W3C recommendations for web applications. For more information, visit http://www.w3.org/TR/widgets/.

The content of the package is compressed using the ZIP archive algorithms and its file must have the extension .wgt. Its MIME type is application/widget.

Several files and folders with reserved names shown in the following table have to be included inside the package of the Tizen web application. After successful installation, a directory, whose name matches the package ID, is created at /opt/usr/apps. The directory hierarchy also includes folders bin (for the application's binary files), data, and res.

Name

Description

config.xml

Web widget's configurations.

icon.gif

Several file types for icon are supported.

icon.ico

icon.jpg

icon.png

icon.svg

index.html

Several file types are supported for main entry page. By default the name is index.

index.htm

index.svg

index.xhtml

index.htt

locales

Directory that contains localization data.

Reserve directory and filenames for web applications

Web applications can be installed through SDB through the Tizen IDE or the command-line interface if the developer mode is enabled. Users can download the application from Tizen Store or other stores once it is published.

The package manager of the operating system on the device is responsible for the installation and the management of installed applications. To see the list of all installed applications, launch Settings and select Manage Applications. Click on the application to remove it or to stop it if it is running.

Since Tizen 2.0, it is possible to develop mobile applications using C/C++ programming languages. Although in most of the cases, web applications should be preferred and recommended, native programming is useful for faster performance, low-level access to device capabilities, compatibility with existing Bada applications, as well as third-party libraries and frameworks, such as Qt for Tizen. Native programming for Tizen supports both service applications and applications with GUI.

Follow these guidelines to create a simple Tizen native application:

Following this procedure, the Tizen IDE will automatically create the filesystem of the project as well as C++ and resource files.

The main class of a native Tizen mobile application must inherit the class Tizen::App::UiApp or the class Tizen::App::ServiceApp. Our example inherits Tizen::App::UiApp and overloads several methods including OnAppInitializing() and OnAppInitialized().

After the launch of a native application, OnAppInitializing() is the first method that is called. After that method, OnAppInitialized() is also called, and it creates the frame of our example application using the method AddFrame():

The nothrow statement is used as an argument of the new operator when helloWorldFrame is created to guarantee that an exception will not be thrown. Also note the L prefix of the hardcoded string of the name. It indicates that the text is a Unicode string.

While the application is running, each frame can be in one of the following three states: activated, deactivated, or minimized. Upon termination of the application, the method OnAppTerminating() gets called, and all resources must be released.

The modification of the header that had been done through Tizen Native UI Builder was saved as the XML file IDL_FORM.xml. The Native UI Builder simplifies the process, but the same effect will be achieved if the XML file is edited manually.

After the successful development and testing of a native application, all of its files must be bundled together into a single installation file, whose extension is .tpk. This file is called package. It sounds similar to the Android application package file (APK), and it has the same purpose. The .tpk file is used to install native applications on Tizen devices and should be uploaded to Tizen Store when the application is published.

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
Getting ready

The tools to build Tizen applications are integrated with the Tizen IDE. The building process is simple and it is fully automated. Please ensure that the Tizen SDK and IDE are properly installed before you proceed.

The package produced by the Tizen IDE is created according to W3C recommendations for web applications. For more information, visit http://www.w3.org/TR/widgets/.

The content of the package is compressed using the ZIP archive algorithms and its file must have the extension .wgt. Its MIME type is application/widget.

Several files and folders with reserved names shown in the following table have to be included inside the package of the Tizen web application. After successful installation, a directory, whose name matches the package ID, is created at /opt/usr/apps. The directory hierarchy also includes folders bin (for the application's binary files), data, and res.

Name

Description

config.xml

Web widget's configurations.

icon.gif

Several file types for icon are supported.

icon.ico

icon.jpg

icon.png

icon.svg

index.html

Several file types are supported for main entry page. By default the name is index.

index.htm

index.svg

index.xhtml

index.htt

locales

Directory that contains localization data.

Reserve directory and filenames for web applications

Web applications can be installed through SDB through the Tizen IDE or the command-line interface if the developer mode is enabled. Users can download the application from Tizen Store or other stores once it is published.

The package manager of the operating system on the device is responsible for the installation and the management of installed applications. To see the list of all installed applications, launch Settings and select Manage Applications. Click on the application to remove it or to stop it if it is running.

Since Tizen 2.0, it is possible to develop mobile applications using C/C++ programming languages. Although in most of the cases, web applications should be preferred and recommended, native programming is useful for faster performance, low-level access to device capabilities, compatibility with existing Bada applications, as well as third-party libraries and frameworks, such as Qt for Tizen. Native programming for Tizen supports both service applications and applications with GUI.

Follow these guidelines to create a simple Tizen native application:

Following this procedure, the Tizen IDE will automatically create the filesystem of the project as well as C++ and resource files.

The main class of a native Tizen mobile application must inherit the class Tizen::App::UiApp or the class Tizen::App::ServiceApp. Our example inherits Tizen::App::UiApp and overloads several methods including OnAppInitializing() and OnAppInitialized().

After the launch of a native application, OnAppInitializing() is the first method that is called. After that method, OnAppInitialized() is also called, and it creates the frame of our example application using the method AddFrame():

The nothrow statement is used as an argument of the new operator when helloWorldFrame is created to guarantee that an exception will not be thrown. Also note the L prefix of the hardcoded string of the name. It indicates that the text is a Unicode string.

While the application is running, each frame can be in one of the following three states: activated, deactivated, or minimized. Upon termination of the application, the method OnAppTerminating() gets called, and all resources must be released.

The modification of the header that had been done through Tizen Native UI Builder was saved as the XML file IDL_FORM.xml. The Native UI Builder simplifies the process, but the same effect will be achieved if the XML file is edited manually.

After the successful development and testing of a native application, all of its files must be bundled together into a single installation file, whose extension is .tpk. This file is called package. It sounds similar to the Android application package file (APK), and it has the same purpose. The .tpk file is used to install native applications on Tizen devices and should be uploaded to Tizen Store when the application is published.

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
How to do it...

Perform the described actions to build a Tizen web application from the Tizen IDE:

Launch the Tizen IDE, and navigate to the Project Explorer view. Select the project of the application.
Right-click on the project, and navigate to Project | Build Package.

The package produced by the Tizen IDE is created according to W3C recommendations for web applications. For more information, visit http://www.w3.org/TR/widgets/.

The content of the package is compressed using the ZIP archive algorithms and its file must have the extension .wgt. Its MIME type is application/widget.

Several files and folders with reserved names shown in the following table have to be included inside the package of the Tizen web application. After successful installation, a directory, whose name matches the package ID, is created at /opt/usr/apps. The directory hierarchy also includes folders bin (for the application's binary files), data, and res.

Name

Description

config.xml

Web widget's configurations.

icon.gif

Several file types for icon are supported.

icon.ico

icon.jpg

icon.png

icon.svg

index.html

Several file types are supported for main entry page. By default the name is index.

index.htm

index.svg

index.xhtml

index.htt

locales

Directory that contains localization data.

Reserve directory and filenames for web applications

Web applications can be installed through SDB through the Tizen IDE or the command-line interface if the developer mode is enabled. Users can download the application from Tizen Store or other stores once it is published.

The package manager of the operating system on the device is responsible for the installation and the management of installed applications. To see the list of all installed applications, launch Settings and select Manage Applications. Click on the application to remove it or to stop it if it is running.

Since Tizen 2.0, it is possible to develop mobile applications using C/C++ programming languages. Although in most of the cases, web applications should be preferred and recommended, native programming is useful for faster performance, low-level access to device capabilities, compatibility with existing Bada applications, as well as third-party libraries and frameworks, such as Qt for Tizen. Native programming for Tizen supports both service applications and applications with GUI.

Follow these guidelines to create a simple Tizen native application:

Following this procedure, the Tizen IDE will automatically create the filesystem of the project as well as C++ and resource files.

The main class of a native Tizen mobile application must inherit the class Tizen::App::UiApp or the class Tizen::App::ServiceApp. Our example inherits Tizen::App::UiApp and overloads several methods including OnAppInitializing() and OnAppInitialized().

After the launch of a native application, OnAppInitializing() is the first method that is called. After that method, OnAppInitialized() is also called, and it creates the frame of our example application using the method AddFrame():

The nothrow statement is used as an argument of the new operator when helloWorldFrame is created to guarantee that an exception will not be thrown. Also note the L prefix of the hardcoded string of the name. It indicates that the text is a Unicode string.

While the application is running, each frame can be in one of the following three states: activated, deactivated, or minimized. Upon termination of the application, the method OnAppTerminating() gets called, and all resources must be released.

The modification of the header that had been done through Tizen Native UI Builder was saved as the XML file IDL_FORM.xml. The Native UI Builder simplifies the process, but the same effect will be achieved if the XML file is edited manually.

After the successful development and testing of a native application, all of its files must be bundled together into a single installation file, whose extension is .tpk. This file is called package. It sounds similar to the Android application package file (APK), and it has the same purpose. The .tpk file is used to install native applications on Tizen devices and should be uploaded to Tizen Store when the application is published.

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
How it works…

The package produced by

the Tizen IDE is created according to W3C recommendations for web applications. For more information, visit http://www.w3.org/TR/widgets/.

The content of the package is compressed using the ZIP archive algorithms and its file must have the extension .wgt. Its MIME type is application/widget.

Several files and folders with reserved names shown in the following table have to be included inside the package of the Tizen web application. After successful installation, a directory, whose name matches the package ID, is created at /opt/usr/apps. The directory hierarchy also includes folders bin (for the application's binary files), data, and res.

Name

Description

config.xml

Web widget's configurations.

icon.gif

Several file types for icon are supported.

icon.ico

icon.jpg

icon.png

icon.svg

index.html

Several file types are supported for main entry page. By default the name is index.

index.htm

index.svg

index.xhtml

index.htt

locales

Directory that contains localization data.

Reserve directory and filenames for web applications

Web applications can be installed through SDB through the Tizen IDE or the command-line interface if the developer mode is enabled. Users can download the application from Tizen Store or other stores once it is published.

The package manager of the operating system on the device is responsible for the installation and the management of installed applications. To see the list of all installed applications, launch Settings and select Manage Applications. Click on the application to remove it or to stop it if it is running.

Since Tizen 2.0, it is possible to develop mobile applications using C/C++ programming languages. Although in most of the cases, web applications should be preferred and recommended, native programming is useful for faster performance, low-level access to device capabilities, compatibility with existing Bada applications, as well as third-party libraries and frameworks, such as Qt for Tizen. Native programming for Tizen supports both service applications and applications with GUI.

Follow these guidelines to create a simple Tizen native application:

Following this procedure, the Tizen IDE will automatically create the filesystem of the project as well as C++ and resource files.

The main class of a native Tizen mobile application must inherit the class Tizen::App::UiApp or the class Tizen::App::ServiceApp. Our example inherits Tizen::App::UiApp and overloads several methods including OnAppInitializing() and OnAppInitialized().

After the launch of a native application, OnAppInitializing() is the first method that is called. After that method, OnAppInitialized() is also called, and it creates the frame of our example application using the method AddFrame():

The nothrow statement is used as an argument of the new operator when helloWorldFrame is created to guarantee that an exception will not be thrown. Also note the L prefix of the hardcoded string of the name. It indicates that the text is a Unicode string.

While the application is running, each frame can be in one of the following three states: activated, deactivated, or minimized. Upon termination of the application, the method OnAppTerminating() gets called, and all resources must be released.

The modification of the header that had been done through Tizen Native UI Builder was saved as the XML file IDL_FORM.xml. The Native UI Builder simplifies the process, but the same effect will be achieved if the XML file is edited manually.

After the successful development and testing of a native application, all of its files must be bundled together into a single installation file, whose extension is .tpk. This file is called package. It sounds similar to the Android application package file (APK), and it has the same purpose. The .tpk file is used to install native applications on Tizen devices and should be uploaded to Tizen Store when the application is published.

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
See also

Check the recipe Tizen native app programming to learn how to create multiproject applications and how to bundle hybrid applications.

Since Tizen 2.0, it is possible to develop mobile applications using C/C++ programming languages. Although in most of the cases, web applications should be preferred and recommended, native programming is useful for faster performance, low-level access to device capabilities, compatibility with existing Bada applications, as well as third-party libraries and frameworks, such as Qt for Tizen. Native programming for Tizen supports both service applications and applications with GUI.

Follow these guidelines to create a simple Tizen native application:

Following this procedure, the Tizen IDE will automatically create the filesystem of the project as well as C++ and resource files.

The main class of a native Tizen mobile application must inherit the class Tizen::App::UiApp or the class Tizen::App::ServiceApp. Our example inherits Tizen::App::UiApp and overloads several methods including OnAppInitializing() and OnAppInitialized().

After the launch of a native application, OnAppInitializing() is the first method that is called. After that method, OnAppInitialized() is also called, and it creates the frame of our example application using the method AddFrame():

The nothrow statement is used as an argument of the new operator when helloWorldFrame is created to guarantee that an exception will not be thrown. Also note the L prefix of the hardcoded string of the name. It indicates that the text is a Unicode string.

While the application is running, each frame can be in one of the following three states: activated, deactivated, or minimized. Upon termination of the application, the method OnAppTerminating() gets called, and all resources must be released.

The modification of the header that had been done through Tizen Native UI Builder was saved as the XML file IDL_FORM.xml. The Native UI Builder simplifies the process, but the same effect will be achieved if the XML file is edited manually.

After the successful development and testing of a native application, all of its files must be bundled together into a single installation file, whose extension is .tpk. This file is called package. It sounds similar to the Android application package file (APK), and it has the same purpose. The .tpk file is used to install native applications on Tizen devices and should be uploaded to Tizen Store when the application is published.

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
Tizen native app programming

Since Tizen 2.0, it is

possible to develop mobile applications using C/C++ programming languages. Although in most of the cases, web applications should be preferred and recommended, native programming is useful for faster performance, low-level access to device capabilities, compatibility with existing Bada applications, as well as third-party libraries and frameworks, such as Qt for Tizen. Native programming for Tizen supports both service applications and applications with GUI.

Follow these guidelines to create a simple Tizen native application:

Following this procedure, the Tizen IDE will automatically create the filesystem of the project as well as C++ and resource files.

The main class of a native Tizen mobile application must inherit the class Tizen::App::UiApp or the class Tizen::App::ServiceApp. Our example inherits Tizen::App::UiApp and overloads several methods including OnAppInitializing() and OnAppInitialized().

After the launch of a native application, OnAppInitializing() is the first method that is called. After that method, OnAppInitialized() is also called, and it creates the frame of our example application using the method AddFrame():

The nothrow statement is used as an argument of the new operator when helloWorldFrame is created to guarantee that an exception will not be thrown. Also note the L prefix of the hardcoded string of the name. It indicates that the text is a Unicode string.

While the application is running, each frame can be in one of the following three states: activated, deactivated, or minimized. Upon termination of the application, the method OnAppTerminating() gets called, and all resources must be released.

The modification of the header that had been done through Tizen Native UI Builder was saved as the XML file IDL_FORM.xml. The Native UI Builder simplifies the process, but the same effect will be achieved if the XML file is edited manually.

After the successful development and testing of a native application, all of its files must be bundled together into a single installation file, whose extension is .tpk. This file is called package. It sounds similar to the Android application package file (APK), and it has the same purpose. The .tpk file is used to install native applications on Tizen devices and should be uploaded to Tizen Store when the application is published.

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
Getting ready

The native development framework for Tizen is quite complex. The most significant differences from the standard C++ are the exception handling mechanism and the two-phase constructors. Although Tizen does not use C++ exceptions, you can use try-catch statements for your own application's C++ exceptions.

Tizen native applications for mobile devices are based on the graphics stack of Bada, which is known as a native framework or

OSP (Open Service Platform). During the port of existing Bada C++ applications, the OSP namespace should be renamed to Tizen. This porting process can easily be done through the Tizen IDE. The full list of available namespaces in the Tizen native framework is available at https://developer.tizen.org/dev-guide/2.2.1/org.tizen.native.apireference/namespaces.html.

Furthermore, Tizen native frameworks contain hidden gems, such as the specific life cycle of native applications and the macros used for logging.

Please explore in detail the native development documentation if you plan to develop sophisticated Tizen native mobile applications.

Follow these guidelines to create a simple Tizen native application:

Following this procedure, the Tizen IDE will automatically create the filesystem of the project as well as C++ and resource files.

The main class of a native Tizen mobile application must inherit the class Tizen::App::UiApp or the class Tizen::App::ServiceApp. Our example inherits Tizen::App::UiApp and overloads several methods including OnAppInitializing() and OnAppInitialized().

After the launch of a native application, OnAppInitializing() is the first method that is called. After that method, OnAppInitialized() is also called, and it creates the frame of our example application using the method AddFrame():

The nothrow statement is used as an argument of the new operator when helloWorldFrame is created to guarantee that an exception will not be thrown. Also note the L prefix of the hardcoded string of the name. It indicates that the text is a Unicode string.

While the application is running, each frame can be in one of the following three states: activated, deactivated, or minimized. Upon termination of the application, the method OnAppTerminating() gets called, and all resources must be released.

The modification of the header that had been done through Tizen Native UI Builder was saved as the XML file IDL_FORM.xml. The Native UI Builder simplifies the process, but the same effect will be achieved if the XML file is edited manually.

After the successful development and testing of a native application, all of its files must be bundled together into a single installation file, whose extension is .tpk. This file is called package. It sounds similar to the Android application package file (APK), and it has the same purpose. The .tpk file is used to install native applications on Tizen devices and should be uploaded to Tizen Store when the application is published.

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
How to do it...

Follow these guidelines to create

a simple Tizen native application:

Following this procedure, the Tizen IDE will automatically create the filesystem of the project as well as C++ and resource files.

The main class of a native Tizen mobile application must inherit the class Tizen::App::UiApp or the class Tizen::App::ServiceApp. Our example inherits Tizen::App::UiApp and overloads several methods including OnAppInitializing() and OnAppInitialized().

After the launch of a native application, OnAppInitializing() is the first method that is called. After that method, OnAppInitialized() is also called, and it creates the frame of our example application using the method AddFrame():

The nothrow statement is used as an argument of the new operator when helloWorldFrame is created to guarantee that an exception will not be thrown. Also note the L prefix of the hardcoded string of the name. It indicates that the text is a Unicode string.

While the application is running, each frame can be in one of the following three states: activated, deactivated, or minimized. Upon termination of the application, the method OnAppTerminating() gets called, and all resources must be released.

The modification of the header that had been done through Tizen Native UI Builder was saved as the XML file IDL_FORM.xml. The Native UI Builder simplifies the process, but the same effect will be achieved if the XML file is edited manually.

After the successful development and testing of a native application, all of its files must be bundled together into a single installation file, whose extension is .tpk. This file is called package. It sounds similar to the Android application package file (APK), and it has the same purpose. The .tpk file is used to install native applications on Tizen devices and should be uploaded to Tizen Store when the application is published.

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
How it works

Following this procedure, the Tizen IDE will automatically create the filesystem of the project as well as C++ and resource files.

The main class of a native Tizen mobile application must inherit the class Tizen::App::UiApp or the class Tizen::App::ServiceApp. Our example inherits Tizen::App::UiApp and overloads several methods including OnAppInitializing() and OnAppInitialized().

After the launch of a

After the successful development and testing of a native application, all of its files must be bundled together into a single installation file, whose extension is .tpk. This file is called package. It sounds similar to the Android application package file (APK), and it has the same purpose. The .tpk file is used to install native applications on Tizen devices and should be uploaded to Tizen Store when the application is published.

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
See also

To find out details about native application development and C++ API references, please have a look at the sample native

After the successful development and testing of a native application, all of its files must be bundled together into a single installation file, whose extension is .tpk. This file is called package. It sounds similar to the Android application package file (APK), and it has the same purpose. The .tpk file is used to install native applications on Tizen devices and should be uploaded to Tizen Store when the application is published.

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
Packaging Tizen native apps

After the successful

development and testing of a native application, all of its files must be bundled together into a single installation file, whose extension is .tpk. This file is called package. It sounds similar to the Android application package file (APK), and it has the same purpose. The .tpk file is used to install native applications on Tizen devices and should be uploaded to Tizen Store when the application is published.

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
Getting ready

Native mobile applications that consist of several projects are also supported by Tizen. This type of application combines a GUI project with one or more projects of service applications that do not have a GUI.

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
How to do it...

Perform the following steps to create a package of a Tizen native mobile application from a single project.

Locate the project of the application at the Project Explorer of Tizen IDE, and select it.
Click on the project, and from the context menu, choose Project > Build Package > TPK.
Finally, click on OK.

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
How it works...

Both the packages, Tizen native mobile and Tizen web applications, are compressed with the ZIP algorithms. Unlike the web application, the extension of the native mobile application is .tpk. The MIME type of the package is application/x-tizen.package-archive. The content of the package is spread among the following directories, whose names are reserved:

Directory Name

Description

bin

Application's binaries

data

Private data

info

Metadata (including manifest.xml)

lib

Libraries

res

Resources

settings

Settings

shared

Shared resources

Reserved directories of a native mobile application

The

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
Becoming a Tizen Store seller

Tizen Store is the official and the first application marketplace for the Tizen platform. You can register and publish your applications at Tizen Store to reach users and increase your review.

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
Getting ready

Registering with

To register as a Tizen Store seller, you should perform the following simple actions:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Sign Up Now.
  3. If you are an independent developer, select Register as a Private Seller. If you are representing a company, select Register as a Corporate Seller.
  4. Follow the onscreen instructions (four steps), and provide the required information to complete the registration successfully.
  5. To publish paid applications, you should obtain commercial status. Click on the Request Commercial Seller Status button on the last step of the registration, or log in and go to your profile page.

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
How to do it...

To register as a Tizen Store seller, you should perform the following simple actions:

Launch your favorite web browser, and go to

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
How it works...

Tizen Store is operated by Samsung. The registration is free. After registration, the seller must request commercial status to be able to offer paid applications.

The revenue from paid applications is split as 30 percent for Samsung and 70 percent for the seller. By the way, this is an industry-standard revenue split, because the same shares are reserved for the publishers at many application stores for other operating systems.

Payments to the sellers are

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
See also

Refer to the next recipe to learn how to publish applications to Tizen Store. Check the Tizen Store terms and conditions

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
Publishing apps to Tizen Store

After development, testing, and packaging of an application, it is time to launch it on the market. Register to Tizen Store, and publish your web or native application as free or paid content.

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
Getting ready

Before you start, it is

Upload and publish your Tizen application to Tizen Store in five simple steps:

  1. Launch your favorite web browser, and go to http://seller.tizenstore.com.
  2. Click on Add New App.
  3. Fill in the basic information, upload the application's package, and after that, click on Next to proceed.
  4. On the Display Information screen, fill the description, add tags, and so on. When you are ready, click on Next.
  5. Verify the information that you have entered on the Final Review screen, and if everything is OK, click on Confirm.
How to do it...

Upload and publish your Tizen application to Tizen Store in five simple steps:

Launch your favorite web browser, and go to How it works...

The application See also

For details regarding the application submission process, please log in to the website for Tizen Store sellers, and access the user's manuals by clicking on the Guides button.
About the Author
  • Leon Anavi

    Leon Anavi is a professional software engineer and an open source enthusiast focused on mobile applications and platforms. He is a regular contributor to Qt for Tizen, Tizen projects, and various other open source projects. He is the founder of the open source project Tizen-sunxi, which ports Tizen to devices with Allwinner SoCs. He has won several awards and earned honorable mentions from competitions organized by Samsung, Intel, Nokia, BlackBerry, and maemo.org. He earned a Bachelor's degree in Computer Systems and Technologies from Technical University of Sofia in 2008; a Master's degree in Information Technologies from Technical University of Sofia in 2010; and a Master of Business Administration degree from New Bulgarian University, Sofia, in 2011. He was a speaker at the following conferences: Mobile Monday Sofia in January 2011 Openmobility Conference 2013, Bratislava, in April 2013 PlovDev 2013, Plovdiv, Bulgaria, in October 2013 OpenFest 2013, Sofia, Bulgaria, in November 2013 FOSDEM 2014, Brussels, Belgium, in February 2014 Tizen Developer Conference 2014, San Francisco, U.S., in June 2014 He was also a co-founder of and speaker at TuxCon 2014, Plovdiv, Bulgaria.

    Browse publications by this author
Tizen Cookbook
Unlock this book and the full library FREE for 7 days
Start now