How to make a Tizen .NET fitness app for Samsung Galaxy Watch

WOD Insight is a Samsung Galaxy Watch app tailored for CrossFit, HIIT, and Functional Fitness. You can download the app from Galaxy Store here, or App Store here if you own an Apple Watch.

WOD Insight watch app is a variety of timers, such as Stopwatch, TABATA, AMRAP, EMOM, Interval timer. What makes the app unique is that WOD Insight is not just a timer, but a rep counter on your wrist. While the time is running the app helps an athlete keep track of the reps completed, which is very easy to lose during CrossFit workouts.

Here is a classic CrossFit workout called “Cindy”: In 20 minutes complete as many repetitions as possible of:

  • 5 Pull-Ups
  • 10 Push-Ups
  • 15 Air Squats

The score is the number of rounds and reps completed. Many people use poker chips to keeps track of the rounds when they do not use WOD Insight.

Based on heartbeat, rounds completed and rep distribution WOD Insight creates a performance report which athletes use to adjust their training strategies. You can read more about the reports here How I hacked CrossFit Open 2020

Image for post
Image for post

Programming language

If you want to make an app for Samsung Galaxy Watch you have three options:

  1. Native app(C++)
  2. Web app(JavaScript)
  3. Xamarin app(.NET)

More info here

Even though my current tech stack is JavaScript+React.js+Node.js, I decided I’ll go with Xamarin. I have 10 years of C#.NET experience, I’d been working with Xamarin for Android during my The World Bank times. In addition, my Crossfit-addict husband and quarantine buddy ❤️ works with Xamarin every day and expressed a desire to participate in my fitness startup journey.

Environment setup

I resurrected my old Windows laptop with Visual Studio and went through this manual to add Tool for Tizen. https://docs.tizen.org/application/vstools/install/

And emulator set up tutorial: https://docs.tizen.org/application/vstools/tools/emulator-manager/

When you deploy an app on a real device

You need to register certificates, go through this manual https://developer.samsung.com/galaxy-watch-develop/getting-certificates/overview.html

Wearable Circular UI

This is your UI component toolbox. Make your self familiar with it. The quick overview is here

The best source of UI examples is this GitHub repo: https://github.com/Samsung/Tizen.CircularUI

Install the sample apps on your watch or emulator and play with the components. The library is pretty extensive and you can draw a lot of inspiration from it for your future app

More app examples from Samsung

This is Sample Applications for Wearable Samsung devices, it has a lot of useful examples.

Let’s talk more about fitness apps

Below is the list of questions answered you’ll probably ask when going to make a Fitness Galaxy Watch app.

  1. During a workout, your app will be sent to the background and you need to bring it back when a user activates the screen. Explicitly launch our app when the screen gets active again. Read more here https://docs.tizen.org/application/dotnet/guides/app-management/app-controls/. StateChanged event of Tizen.System.Display will help you recognize when the screen is back on.
  2. How Keep the screen always on? The docs will tell you to use Tizen.System.Power , but it is implemented in API 5, and if you working with API 4 then you need to use DllImport. You can find a working example here
  3. Make Heartrate and Pedometer(calories, steps, etc) monitors working in the background. In the examples you’ll probably find this piece of code: “var heartRateMonitor = new HRM { Interval = 500 }”. Important: set HRM’s and Pedometer’s PausePolicy to “SensorPausePolicy.None” if you want heart rate and calories/steps counting when the app is in the background.
  4. Haptic feedback. WOD Insight utilizes haptic feedback a lot. The app notifies athletes with a gentle buzz when TABATA’s work/rest is about to end, or the heart rate is to hight or too low for optimal performance. For that reason, haptic feedback must work from the background too, because, well 🤷, let’s be honest, fitness people do not install your app to stare on the screen, they’ll be doing a lot of fitness, occasionally picking on the watch. Haptic feedback is a greater way to communicate with your user. If you want to do similar then include “background-category” to your manifest.
  5. Network connectivity. The watch can be connected to the internet via Wi-Fi or Cellular or Bluetooth through the phone. The trick is you need to handle web requests differently depending on the connectivity type. Read more here https://developer.samsung.com/tizen/blog/en-us/2019/08/14/use-web-proxy-to-access-the-internet-when-a-samsung-galaxy-watch-and-a-phone-are-connected-with-bluetooth

Release your app

You going to release the app through Samsung Seller Portal.

You need to manually select all devices compatible with your app.

Important: Unlike AppStoreConnect Samsung Seller Portal would not pick up automatically device compatibility form the binary you provided.

And you need to go through a list of over 1500 devices every time when you roll out a new version…

Go here for device compatibility https://developer.samsung.com/galaxy-watch-develop/device-compatibility.html

Check “Devices other than Samsung (Android)” and “Devices other than Samsung (iOS)” at the very bottom of the list too. If you won’t do that then people with iPhones, Pixels, and other non-Samsung smartphones won't be able to install your app on their Galaxy Watch.

Samsung Health Integration

https://developer.samsung.com/health/android/overview.html

I haven’t implemented it yet. The main reason is it’s impossible to get partner approval from Samsung at the moment.

Official Samsung position:

We are currently going through an update to better support our partners. For that reason, we will not be accepting any applications for the Partner Apps Program at this time.

I’ll update this section when SHealth will get available to me as a developer. If you are someone who successfully integrated Samsung Health with your app comment below or DM me or email me on nastya@voopty.com I’m very interested in your experience.

Yes, Nastya as “nasty”+”a”

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store