In this tutorial, you will learn how to:
You can start building your application by creating a solution project. Follow the steps below to create a wearable Tizen .NET project:
Install Tizen .NET development environment
Launch Visual Studio 2019.
Create a new project.
When you first open Visual Studio, the following window appears, click Create a new project. If Visual Studio is already open, you can create a new project by choosing File > New > Project on the menu bar or by clicking the New Project button on the toolbar.
Select a project template and click Next.
When the Create-a-new-project window appears, filter project templates by selecting C#, Tizen, and 5.5 from dropdown menus as shown in the image below.
You can select the appropriate template according to the app type you want. In this tutorial, we choose Tizen Wearable Xaml App template to target Tizen 5.5.
When the configure-your-new-project window appears, enter "MySteps" in the Project name edit box. Visual Studio will automatically update the Solution name edit box to "MySteps".
Change the disk location where your solution will be stored. Otherwise, it will be saved in %USERPROFILE%\source\repos by default. Then click Create.
The Solution Explorer shows your Tizen .NET solution/project that you just created.
Here, we briefly introduce the folders and files in the Solution Explorer.
Don't worry if you cannot fully understand them right now. We will cover them in more detail later in the follow-up tutorials.
To build your application, click Build > Build Solution on the Visual Studio menu bar or press Ctrl+Shift+B.
If Visual Studio successfully builds the solution, it creates a Tizen package file named org.tizen.example.MySteps-1.0.0.tpk. The Tizen Package (.tpk) is the package file format for installation and distribution of Tizen .NET apps.
You can check the full path of the created .tpk file in the Output window.
<the location of your project>/bin/Release/tizen60/org.tizen.example.MySteps-1.0.0.tpk
<the location of your project>/bin/Debug/tizen60/org.tizen.example.MySteps-1.0.0.tpk
To run your application, you must first deploy the built package file to a target: either an emulator or a real device. Deploying refers to transferring the package file to the target and installing it.
On the Visual Studio menu bar, select Tools > Tizen > Tizen Emulator Manager. Alternatively, click Launch Tizen Emulator on the toolbar to open the Tizen Emulator Manager.
When the Emulator Manager window appears, select Tizen 5.5 Wearable emulator and press the Launch button. If no applicable emulator exists, create an emulator instance.
Once you launch Tizen Wearable emulator, you can run your app in debug mode on it by using F5 shortcut key or use Ctrl-F5 shortcut key to start your app without debug mode.
If the deployment is successful, MySteps will run on the emulator as follows.
The connection between a PC and a Galaxy Watch requires a wireless connection. Thus, you need to have a wireless access point.
Turn on the debugging mode by toggling the switch button to On in Settings > About watch > Debugging.
Turn on the Wi-Fi connection in Settings > Connections > Wi-Fi and then select Wi-Fi networks. After the device has completed the scanning for wireless connections, select the Wi-Fi network that you wish to connect.
After the Galaxy Watch has connected to the Wi-Fi network, you need to check the IP address assigned to the device. This IP address will be used in the following steps by the Tizen Device Manager.
On the Visual Studio menu bar, open the Tizen Device Manager by clicking Tools > Tizen > Tizen Device Manager.
Open Remote Device Manager and click Add Device.
Toggle the Connection switch button to "ON".
Press Ctrl+F5 in Visual Studio to deploy and launch without debugging on the device, or press F5 to launch in debugger mode.
In this tutorial, you've learned how to create, build, and run a Tizen .NET app for Galaxy Watch. In the next tutorial, you'll learn how to create the main page of MySteps.