This guide is tested on Linux Mint 17, and most of it should also work for Ubuntu.
Note: Any red text in this guide might be different based on your own configurations or the software versions you download.
You will need to download two things before you start.
- The installer for the latest version of the Tizen SDK for Ubuntu (2.3 at the time of this article)
- The latest version of the Oracle JDK for Linux
Both applications have a 32 bit and 64 bit version, so choose whichever one is correct for you. If you don’t know whether you have a 32-bit or 64- bit processor, run ‘lscpu’ from any terminal window and take a look at the first line, which is labeled Architecture. Anything similar to X86_64 , amd64 , and X64 is 64-bit, anything like X86 , i686 , and i386 is 32-bit.
Install Oracle JDK
The Tizen development kit requires Oracle JDK, but Linux Mint comes with OpenJDK by default. You will need to remove OpenJDK and install Oracle JDK. This is a relatively simple and straightforward process.
- Open a terminal window.(Ctrl + Alt + T)
- Remove OpenJDK
$ sudo apt-get update && sudo apt-get remove openjdk*
- Change to the directory you downloaded Oracle JDK to.
$ cd ~/Downloads
- Extract the tarball.
$ tar -zxvf jdk-8u25-linux-x64.tar.gz
- As super user, make a directory to store the Oracle JDK.
$ sudo mkdir -p /opt/java
- Move the extracted folder to the newly created directory.
$ sudo mv jdk1.8.0_25 /opt/java
- Make the Oracle JDK the system default
$ sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.8.0_25/bin/java" 1
- Check the installed version of Java.
$ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
Install the Tizen SDK
There is a single missing dependency that needs to be installed in Mint before running the Tizen SDK installer.
$ sudo apt-get install rpm2cpio
Change to the directory that contains the Tizen SDK installer, make the bin file executable, and run it.
$ cd ~/Downloads $ chmod +x tizen-sdk_2.3.63_ubuntu-64.bin $ ./tizen-sdk_2.3.63_ubuntu-64.bin
Once the installer has been launched, click install, and then choose whether or not you want to install the mobile or wearable profiles. I will be developing for Tizen smart watches, so I chose wearable, but if you want to make phone apps, choose mobile. You can always download a different profile later if you might want to use both. Finally, accept the license agreement and click install. The installer will need to download the SDK, which is quite large, so it will take a while to complete.
Setup A Test Device
If you are going to be building apps, you will need to test them out on something. Fortunately, the Tizen SDK includes an emulator manager that allows you to create and launch virtual machines for testing purposes. The easiest way to access it is by opening the Mint launch menu, search for “Tizen” and launch the Emulator Manager.
The Emulator Manager allows you to quickly setup VM’s with customized hardware settings and test a wide range of events and sensors. I personally have a Samsung Gear 2 Neo, so I created an emulator that matches the specs of my watch. Once you have created the emulator, launch it and take a look at the control panel for the device by right clicking on it and choosing Control Panel. This lets you test out sensors and events such as the heart rate monitor, battery levels, the accelerometer, location, and more.
Get Familiar with the Development Environment
The Tizen SDK comes packaged with a customized version of Eclipse which can be used to write the code for the apps and push apps to the emulator. It is named Tizen IDE, and can be found through the Mint launch menu.
If you are unfamiliar with Eclipse, there are three main areas in the the UI that you will be using extensively.
- The Project Explorer in the top left contains all of your projects and their associated files and folders. When you create new Tizen Web Applications, they will appear here.
- The Connection Explorer contains all of the emulators you have available to test your code on. You can use it to push and pull applications to the device or explore the file structure of the device.
Check Out What Tizen Can Do
The first thing you will probably want to do is explore some of the sample apps that come loaded with the Tizen SDK. You can find these by going to File > New > Tizen Web Project. In the new window, choose Sample from the top bar and take a look at the Web Apps listed under the profiles you have installed. There are a handful of samples that demonstrate how things are built in Tizen including a clock widget (the clock used for the watch’s main screen), examples of canvas, camera, and recording functionalities, and a WearableWidgets project that contains dozens of UI examples you can reuse in your own app.
When you have chosen a sample project you want to check out, give it a name, and click finish. It will appear in the project explorer and you can run it on your emulator by clicking on the small blue and white arrow in the Eclipse menu bar, or by right clicking on the folder in the project explorer and going to Run As > Tizen Web Application. It will take a few seconds to build and push the app to the device, but it will eventually appear on your emulator.
Stay tuned to this blog for more tutorials on building things with Tizen!