0

I'm a beginner with Tizen.NET and am wanting to utilise images created on my development machine in my wearable app. I have created a sample TizenWearable app in Visual Studio.

I have saved a circle-cropped.PNG image file in shared/res

enter image description here

I have added the following code to test using the image as a background image:

    // The root page of your application
    MainPage = new ContentPage
    {
        BackgroundImageSource = "circle-cropped.png",
        Content = new StackLayout
        {
            VerticalOptions = LayoutOptions.Center,
            Children = {
                new Label {
                    HorizontalTextAlignment = TextAlignment.Center,
                    Text = "Welcome to Tizen!"
                },
                button,
                label,
                button2
            }
        }
    };

However when I run the emulator to check, my other labels and buttons render fine, but the background is black, with no image.

enter image description here

If I run the emulator shell, I can see my image seems to be included on the file system:

sh-3.2$ ls
TizenWearableApp1.png  circle-cropped.png
sh-3.2$

Where am I going wrong here?

Useme Alehosaini
  • 2,998
  • 6
  • 18
  • 26
JamesMatson
  • 2,522
  • 2
  • 37
  • 86

1 Answers1

1

You should place your resources in res folder.

The shared/res folder is meant for sharing resources with other applications and private application resources shouldn't be placed there.

Jakub T.
  • 71
  • 2
  • Thanks Jakub, that was it! Do you happen to know a tutorial for how to do data exchange between wearable and mobile tizen.net app in c#? I can only find Java or C++ examples. – JamesMatson Dec 22 '20 at 10:03
  • 1
    I'm not sure if you want mobile Tizen.Net app. Generally there are no supported mobile Tizen devices. If you want to communicate with Android app there is [SAP](https://developer.samsung.com/galaxy-watch-develop/creating-your-first-app/net-companion/use-sap.html) there are [samples for it](https://developer.samsung.com/galaxy-watch-develop/samples/companion/overview.html). – Jakub T. Dec 22 '20 at 14:25
  • 1
    If that's not what you're looking for I'd try using [WiFi Direct](https://docs.tizen.org/application/dotnet/guides/connectivity/wifi-direct/) or [Bluetooth](https://docs.tizen.org/application/web/guides/connectivity/bluetooth/) if it's supported on the device. – Jakub T. Dec 22 '20 at 14:25
  • Thanks Jakub. So I would create the watch app using Tizen.NET, then the mobile app using a standard SDK like Xamarin or a web app etc, then use SAP to talk between them? – JamesMatson Dec 24 '20 at 01:44