Hello again, habrazhiteli!
In the previous article, we reviewed the Tizen SDK web part. Today we will review the native part for those who need maximum performance and full access to the functionality of the device in their applications.

')
All interested invite under the cat.
Introduction
In the
previous article, we briefly explained what Tizen is, what it is eaten with and what its specificity is. We learned that Tizen is an open source Linux-based operating system designed for a wide range of devices, such as smartphones, tablet computers, car infotainment systems, ultrabooks, smart TVs, digital cameras, office, home appliances and medical equipment. and other wearable electronics. We looked at it through the eyes of a web developer. Today, we take a look at Tizen SDK from a different, native side.
Tizen architecture

We recall from the previous article that the lowest layer of the architecture is the Linux kernel (for Tizen SDK 2.2 version 3.4+) with device drivers.
Just above are other subsystems of the kernel:
- App Framework. Implements application management functionality, including launching other applications. Provides notification of applications about major system events, such as low memory, low battery, screen orientation changes and push notifications.
- Graphics & UI. Implements the functionality associated with graphics and UI, including EFL (Enlightenment Foundation Libraries), window subsystem, OpenGL, etc.
- Multimedia. Provides support for multimedia: video, audio, images, VoIP, metadata management.
- Location Represents the functionality for the location (GPS, WPS, Cell ID, sensors).
- Messaging. Implements functionality related to SMS, MMS, email and IM.
- Web. Implements Tizen Web API and includes WebKit, provides support for web applications.
- Security. Implements functionality related to security, access control, certificate management, etc.
- System. Responsible for interacting with the device (sensors, display, vibrator), power management, monitoring events from components such as USB, MMC, charger, ear jack, package management, updating the device, interacting with alarm signals.
- Base. Contains a number of system libraries that implement, in addition to the basic functions, the functionality for interacting with databases, localizing and working with XML.
- Connectivity. Responsible for everything related to network interactions (3G, WiFi, Bluetooth, HTTP, NFC).
- Telephony. Implements functionality related to communication and modem operation (UMTS, CDMA, GSM).
- PIM (Personal Information Management). Responsible for such functionality as interaction with the calendar, contacts and tasks.
It can be concluded that among the functional there is almost everything that you may need to develop a variety of applications.
The top layer is a user application, which, we recall, in Tizen are of three types: web, native and hybrid.
Access to the subsystems listed above from applications is carried out through two frameworks: the Web Framework and the Native Framework. As agreed, today we will focus on the latter.
Native framework
In the Tizen Native Framework, everything you need to access the functionality described by your kernel component is organized into a laconic structure of 19 namespaces:
App | Media | Telephony |
Base | Messaging | Text |
Content | Net | Ui |
Graphics | Security | Uix |
Io | Shell | Web |
Locales | Social | |
Locations | System | |
The name of each of the namespaces can be guessed by name: it is application lifecycle management, working with basic data types, content management, working with 2D and 3D primitives, text, images, files, databases, registers, positioning, working with audio and video, messages of various types, network interaction, cryptography, access control and work with certificates, control of the external interface of the device, management of embedded hardware capabilities, telephony, graphic control Interface on both standard and advanced levels, working with sensors, working with web - in other words, absolutely full unlimited access to Tizen functionality.
When developing native applications using the Tizen Native Framework, you need to remember the following:
- Development is conducted in C ++ ANSI ISO 14882 2003 (GCC, LLVM)
- The Tizen Native Framework does not use standard C ++ exceptions. This does not mean that you cannot use this mechanism in your code, but inside the framework this mechanism is not used.
- In Tizen Native Framework, return codes are used instead of exceptions.
- Creating objects is two-phase (first, the constructor, and then an explicit call to the Construct () method for the object).
- The suffix 'N' for the names of functions that pass the returned object to the developer. Those. the developer is responsible for the self-removal of such objects after calling the appropriate functions.
- The use of the RAII idiom (Resource Acquisition Is Initialization, obtaining resources is initialization) is widely used and encouraged.
Native applications in Tizen are divided into 2 types: UI-applications and service applications. Both those and others have unlimited access to the functionality of the device with maximum performance. The life cycle of UI applications is somewhat different from the life cycle of service applications.
The Tizen SDK also includes many sample applications developed using the Tizen Native Framework. Based on these examples, you can easily start developing your application.
And now, as promised, we will introduce you to the toolkit offered by the Tizen SDK.
Tizen ide
The integrated development environment included in the Tizen SDK is based on Eclipse with a set of necessary additions and adaptations for developing applications for Tizen. The outlook for Tizen Web and Tizen Native is somewhat different. Below is a screenshot of the Tizen IDE with the Tizen Native perspective.

The IDE interface is intuitive and contains everything needed for developing, debugging, testing and profiling applications. Event Injector is also available here, with which you can emulate various events, thus allowing you to get by with an emulator during development.
For native development, Tizen IDE offers the following tools / helpers:
- API and Privilege Checker. This tool allows you to identify privilege violations or APIs. It will help you, for example, if you use any functionality that requires certain privileges that are missing in the settings of your application, or if you use an outdated API.
- Applications Settings Editor. A tool to edit your application settings.

- Call Stack View. This tool displays information about the application being debugged in a fault situation.
- Content Assist. Helps to write code quickly and efficiently, providing contextual help when writing code.

- Manifest Text Editor. Allows you to edit the application manifest. The manifest stores basic information about the application, as well as various global settings, such as the required access privileges, etc.
- Oprofile. A tool for profiling an application.

- Project Wizard. Project creation wizard. The following types of projects are available to the developer: Empty Application, Form-based Application, IME Application, Library, OpenGL Application, Service Application, Tab-based Application, Theme Application.
- Smart Launch. A tool that allows you to run an application on a device (or an emulator) from the IDE.

- Snippets. Control tool pre-prepared code snippets.

- Unit Test Tool. A block testing tool that allows you to create unit-test projects, manage test cases and test case sets, and analyze code coverage with tests.
- Valgrind. A tool for profiling memory on an emulator.

Dynamic Analyzer
As part of the Tizen SDK there is another very useful tool for the developer of native applications. This is
Dynamic Analyzer . It allows you to analyze the behavior of your application in real time, recording the changes of all parameters in a single report. See how much memory the application spends, how much the processor loads, how it accesses the file system, and the Dynamic Analyzer allows much, much more.

Ui builder
The next tool is the
Native UI Builder . As you may have guessed, this is a WYSIWYG user interface editor. No more and no less.

UI Effect Builder
If you are bored with the standard user interface and the soul requires complex graphic effects, you will like the
UI Effect Builder tool . It allows you to simulate interactive effects based on physical laws and animation. Unfortunately, the format of the article will not allow to convey how it all looks. But the result is very easy to see if you build and run the EffectsApp application, which is included in the examples from the Tizen SDK.

Tizen Emulator
And the last tool from the Tizen SDK that will no doubt be useful for developers of native applications is the
Tizen Emulator . The emulator is a virtual machine based on QEMU. It allows you to test your application in “conditions close to combat”.

Command-Line Interface (CLI)
And of course, nowhere without the command line for those who cannot exist without it for some reason.
native-gen | Generates a new project. |
native-make | Assembles a project. |
native-packaging | Packing a project. |
native-install | Installs an application on a device (or emulator). |
native-uninstall | Removes an application from a device (or emulator). |
native-run | Runs the application on the device (or emulator). |
native-debug | Starts debugging of the application on the device (or emulator). |
On this we put an end to our detailed review. Unless it remains to mention enough detailed documentation, which is also included in the Tizen SDK.
As you can see for yourself, the Tizen SDK has everything to quickly launch a full-fledged development of native applications for Tizen, for which you are now fully prepared, and if you managed to read our
review of the web part , then also web and hybrid applications. We hope to tell you directly in the following articles about application development for Tizen.
A more detailed description of the Tizen SDK tools can be found
HERE . We provide technical support and answers to questions here: dev.cis@partner.samsung.com
All the best and see you in the next articles!
Tizen Eva Group