Making Your First Samsung Gear S3 App

When I started my research project in the MIT D-Lab Mobile Technology Lab I was excited to build my first smartwatch app using the Samsung Gear S3. Despite being super excited about the project, setting up the development environment took me an entire month 😧 Here’s how to get to the Hello World stage 10x faster than I did.

The goal for this tutorial.

The Samsung Gear S3 uses an open-source operating system called Tizen that’s based on the Linux kernel. You can program apps for the watch in C (“Native”) or with HTML/CSS/JS (“Web”). My project needs fast real-time signal processing, so we chose Native.

The source tutorial for this post is “Creating Your First Tizen Wearable Native Watch Application” by Tizen Developers. The info below should fill in all the gaps in the tutorial.

Installing Tizen Studio

  1. Make sure you have enough space to download and install the Tizen Studio IDE. It’s ~5GB!
  2. In the Tizen Studio package manager, install everything for the 2.3.2 wearable, not 3.0 wearable. This was my first big stumbling block. Also be sure to install the Samsung Certificate Extension.
You need to install both of these things.

Once you’ve installed Tizen Studio, you can go through the “Creating a Project”, “Managing the Application Configuration”, and “Building Your Application” sections of the tutorial.

Running the Emulator

The emulator is basically a little watch that runs on your computer. It takes a long time to start, but you can tell it’s successfully starting up by the boot messages at the top of the emulator watch face.

This is a good sign.

You know it’s ready when it shows up in the Tizen Studio Connection Explorer pane on the right of the IDE. After that, you need to set up security certificates.

Emulator is ready to go.

Security Certificate Profiles

This is the mistake that took me the most time to figure out, and it is completely glossed over in the tutorial. Essentially, you need to go to Tools>Certificate Manager and click “+” to make new certificate. You have to make a Tizen certificate for the emulator to work, and a Samsung certificate for the app to run on the actual watch.

You need the one on the right too!!

It should be fairly straightforward to follow the steps to set up both certificates from there. You can follow the rest of the Tizen Developers tutorial to run the app on the watch emulator with the Tizen certificate profile.

Huzzah!

Running on the real watch

Follow along with the tutorial section “Running on a Target Device”.

When I ran ./sdb connect <watch IP> I never actually got a notification on my watch saying “Allow Gear to read log data, copy files,…”. I just got a notification that said “RSA key fingerprint:…” and clicked the check mark. I had to reset my watch once to get a notification to pop up at all.

Like it says in the tutorial, you know the watch is correctly connected when you see it in the Connection Explorer window. When I run the shell script to connect it says device unauthorized. Please approve on your device. each time, but it still works 😅

Connected!

Another thing they don’t mention in the tutorial: you need to copy the device-profile.xml file to the watch. This file is located at /home/cnord/SamsungCertificate/my_certificate_name/device-profile.xml for me and needs to be copied to home/developer/ on the watch. Copy it over to the watch using the “Push the file to the connected target device” button.

Copy over `device-profile.xml` using this button. This solution comes from this forum.

You may receive an obscure permissions error when trying to do this. If so, as it says in this troubleshooting guide, right-click the device in the Connection Explorer and select “Permit to install applications”. This will transfer device-profile.xml to the /home/developer/ folder of the device for you.

Now, you should be able to select the Samsung security profile, then continue the tutorial with Run As>Tizen Native Application, select the watch face, and see your beautiful new app!

Feel free to email me (cnord@school) if you have any questions, comments, or tips about Samsung Gear development.