Tizen – what it’s like to develop for wearables made by Samsung

At Blast Lab we not only build hardware and software. Before we started to do so, we were a group of technology enthusiasts, and we are the same guys today. During recent years, wearables entered the market. They changed the way people interact with technology. We have been following this topic very carefully and then built Kiddo. But today, we would like to cover the next step in the development of wearables. There is one system which makes an impact on this area, its name is Tizen and we would like to talk about building a Tizen app.

Before we started thinking about our wearables (like Kiddo) Pebble dominated the whole market. Today there is no such hardware company anymore. It was replaced by two companies — Samsung and Apple. So how technology enthusiasts and developers like us can develop for Tizen? Let’s find out!

Why did we choose Tizen app?

Nowadays Samsung has six smartwatches in its offer. Those watches are meant to be used while people train, work and rest. It’s simply made to be with the user all the time. That’s why they have a lot of sensors inside. Every product in Samsung’s Gear line has different features. It is quite surprising that Samsung wasn’t afraid to built watches with different screen aspect ratio. Obviously, this decision gave them a possibility to have a more complex offer.

But we cannot omit the fact, that it made development more challenging.

Now, we have to design and code an app which would work on squared screen as well as on the rounded one. However, Samsung’s watches are designed to be used with Samsung phones and those with Android on board. It makes it worth to build apps for Tizen because they would be compatible with more than 80% of the phones in the market today.

So let’s code…

To give you a proper idea of the development for Tizen, we decided to create an app using two different approaches — web or native app. Then we would compare them and the process of development of each of them.

What is the main difference between Native and Web Application?

The native app gives developer possibilities to use advanced and specific functions. You also have more access to settings of the device, with which your app may cooperate. It uses C language and you create the user interface using EFL framework.

The web app is based on HTML5, CSS, and JavaScript and communicates with the system using Tizen Web Framework. So with the basic front-end knowledge, you are ready to go.

In addition, recently the third approach has been added. You can build the app using .NET and write the user interface in Xamarin Forms. Yet, we won’t discuss it today, because when we started to work with Tizen those tools were still under development. So before we give you our thoughts and insights we would like to test them. This allows us to avoid giving you an incorrect glimpse of this approach.

Documentation and setup

When you are creating an Tizen app, no matter if it is a web app or a native one, you can build it using an existing template. The group of those samples made for web apps is bigger and better than those for the native app. For example, there is one which uses built-in wearables sensors.

They are available at https://developer.tizen.org/development/sample/native

Both ways are precisely described and include a lot of well-prepared examples. Every page includes infographics about the technology approach (native or web) and devices which would be used — smartphones as well as wearables.

Samsung Gear fit on the wrist

User Interface

Building complicated graphics interface through web app approach is simple. You need basic knowledge about CSS. All the views are prepared using HTML. That’s why it doesn’t differ too much from the typical front-end work.

However, the situation is completely different when you build the native app. Here you add all the elements using C/C++. You can prepare more complicated elements with EFL. EFL would help in designing views in the native approach.

As an example, we can try to create a button with shape and color different from the typical one. In web approach, you only need to add accurate hex code and shape dimensions. In the native app, you need to extend default button with a new type, which you have to create. There you add the color and the next step is loading this type into the app.

It is worth noticing that when you prepare the interface of the web app, you have the preview of it already available in the IDE. Unfortunately, it is not the same during the development of the native app (unless you are designing entire views in EFL). In order to preview results of your changes, you have to run your app on the device or in the emulator.

Tizen API

There are a bunch of frameworks already included in Tizen i.e Glib. Unfortunately, the version of them varies based on the version of Tizen on which we would like run our project. In the web app, we cannot include static libraries. The only way to do so is writing communication between native and web. However, building such a hybrid type of app requires a lot of work.

The benefit of building a native app is the fact that you use well-prepared files for declaring functions and variables. When you want to use some functions or get an idea of how they operate, you can just find them and read. This is worth-notice convenience. You get all information without a need to visit a website or search through the documentation. In case of developing the web app, there’s no such solution.

To sum up our comparison

While you want to develop a Tizen app, building the web app is much easier and gives access to popular technologies. The simplicity of the process of creation, development, and preview helps to build app fully designed by you.

On the other hand, people with knowledge of C/C++ would be able to easily understand the architecture of the native app. The only problem, which could cause some difficulties is building highly customize and complex UI.

Samsung makes its best to encourage developers by giving them a variety of tools to craft Tizen apps. Additionally, wearable devices have more functionalities in every iteration. In parallel, they also become more independent of smartphones. In the future, it is possible that you’ll be able to choose functionalities which wearable would have.

Developer View — which way is the best?

Describing a technology in one post would not give a full view of the situation. However, as developers who not only learn about it but also code in for this platform, we have some thoughts. It could be though at the beginning, but we strongly recommend thinking about what you want to do. Probably writing it down would help you too. Next, it is very important to understand the differences between three approaches — web, native and hybrid. The better you understand your needs, the better the effect of your development — product would be.

It is hard to judge it without access to the code of the apps pre-installed on Tizen, but we can guess that Samsung also believes in the hybrid development.

In our case, we think that choosing between native and web isn’t the best way to deal with complex and advanced projects. That’s why today we would suggest mixing those two approaches and build a hybrid. Otherwise, when you build the native app, building the UI would take days and could be very hard. This way would give you the most fluent way to build front-end and took advantage of the native back-end.

The key to the success is to understand when we can simplify our project and its development – build a web app and when we should get out of the comfy box and build the hybrid app.

If you want to get more insight about our work as developers read: How to make iOS development faster?