Overview of the Tizen SDK. Native

Hello again, harangers!

In a 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 device’s functionality in their applications.

image

We invite all interested under cat.

Introduction


In a previous article, we briefly described what Tizen is, what it is eaten with, and what its specifics are. We learned that Tizen is an open Linux-based operating system that is designed for a wide range of devices, such as smartphones, tablets, car infotainment systems, ultrabooks, smart TVs, digital cameras, office, home and medical equipment and other wearable electronics. We looked at him through the eyes of a web developer. Today, we take a look at the Tizen SDK from a different, native perspective.

Tizen Architecture


image

We recall from a previous article that the lowest layer of the architecture is the Linux kernel (for Tizen SDK 2.2 version 3.4+) with device drivers.

Other kernel subsystems are located a little higher:
  • App Framework. It implements application management functionality, including launching other applications. Provides notification of applications about major system events, such as a lack of memory, low battery, screen orientation and push notifications.
  • Graphics & UI. It implements functionality related to graphics and UI, including EFL (Enlightenment Foundation Libraries), window subsystem, OpenGL, etc.
  • Multimedia Provides multimedia support: video, audio, image, VoIP, metadata management.
  • Location. Represents functionality for geolocation (GPS, WPS, Cell ID, sensors).
  • Messaging. It implements the functionality associated with SMS, MMS, email and IM.
  • Web Реализует Tizen Web API и включает в себя Web it, обеспечивает поддержку web-приложений.
  • Security It implements functionality related to security, access control, certificate management, etc.
  • System He is responsible for interaction with the device (sensors, display, vibrator), power management, event monitoring from components such as USB, MMC, charger, ear jack, packet management, device update, interaction with alarm signals.
  • Base It contains a number of system libraries that implement, in addition to basic functions, functionality for interacting with databases, localization, and working with XML.
  • Connectivity He is responsible for everything related to network interactions (3G, WiFi, Bluetooth, HTTP, NFC).
  • Telephony Implements the functionality related to the communication and operation of the modem (UMTS, CDMA, GSM).
  • PIM (Personal Information Management). He is responsible for such functionality as interaction with the calendar, contacts and tasks.

We can conclude that among the functionality there is almost everything that may be needed to develop a wide variety of applications.

The top layer is a user application, which, recall, in Tizen there are three types: web, native and hybrid.

Access to the above subsystems from applications is carried out through two frameworks: Web Framework and 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 arranged in a concise structure of 19 namespaces:
The app Media Telephony
Base Messaging. Text
Content Net Ui
Graphics Security Uix
Io Shell Web
Locales Social
Location. System
The name of each of the namespaces can be guessed by its name: this is application lifecycle management, working with basic data types, content management, working with 2D and 3D primitives, text, images, files, databases, registries, positioning, working with audio and video, various types of messages, network interaction, cryptography, access control and certificate management, external device interface management, integrated hardware capabilities management, telephony, graphical interface management at both standard and advanced levels, working with sensors, working with sensors with web - in other words, absolutely full unlimited access to Tizen functionality.

When developing native applications using the Tizen Native Framework, 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 this mechanism is not used inside the framework.
  • Tizen Native Framework uses return codes instead of exceptions.
  • Creating objects is two-phase (first, the constructor, and then explicitly calling the Construct () method on the object).
  • The suffix 'N' for the names of functions that pass the returned object into the ownership of the developer. Those. the developer is responsible for independently deleting such objects after calling the corresponding functions.
  • The use of the RAII
  • idiom is widely used and encouraged (Resource Acquisition Is Initialization, getting resources is initialization) .

Native applications in Tizen are divided into 2 types: UI applications and service applications. Both of them have unlimited access to the device’s functionality 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 tools that the Tizen SDK offers.

Tizen IDE


The integrated development environment that is part of the Tizen SDK is based on Eclipse with a set of necessary add-ons 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.

image

The IDE interface is intuitive and contains everything you need to develop, debug, test and profile applications. Event Injector is also available here, with which you can emulate various events, thus allowing you to get around the emulator during development.

For native development, the Tizen IDE offers the following tools / helpers:
  • API and Privilege Checker. This tool identifies privilege or API violations. It will help you, for example, if you use any functionality that requires certain privileges that are not in the settings of your application, or if you use an outdated API.
  • Applications Settings Editor. A tool to edit the settings of your application.

image

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

image

  • Manifest Text Editor. Allows editing the manifest of the application. 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.

image

  • 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 emulator) from the IDE.

image

  • Snippets. A tool for managing pre-prepared snippets of code.

image

  • Unit Test Tool. A unit 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.

image

Dynamic analyzer


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

image

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.

image

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 animations. Unfortunately, the format of the article will not allow us to convey how it all looks. But the result is very easy to see if you build and run the EffectsApp application, which is part of the examples from the Tizen SDK.

image

Tizen emulator


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

image

Command-Line Interface (CLI)


And of course, nowhere without a command line for those who for some reason cannot without it.
native-gen Generates a new project.
native-make Assembles a project.
native-packaging Packs the project.
native-install Installs the application on the device (or emulator).
native-uninstall Removes the application from the device (or emulator).
native-run Launches the application on the device (or emulator).
native-debug Starts debugging the application on the device (or emulator).
On this we put an end to our detailed review. Unless, it remains to mention a fairly detailed documentation, which is also part of the Tizen SDK.

As you yourself have seen, the Tizen SDK has everything for a quick start to the full-fledged development of native applications for Tizen, for which you are now fully prepared, and if you have already read our review of the web part , then web and hybrid applications. We hope to tell you directly about the development of applications for Tizen in the following articles.

A more detailed description of the Tizen SDK tools can be found HERE . Technical support and answers to questions we provide here: dev.cis@partner.samsung.com

All the best and see you in the following articles!

Tizen Eva Group