Category Archives: Tizen

Tizen emulator “Extra package installation is failed. cert must be installed MANUALLY”

I started to see the warning/error displayed when starting the emulator “Extra package installation is failed. cert must be installed MANUALLY”. Nothing changed, that I was aware of, i.e. no new installations or the likes.

I found that if you go to (on Windows)

%USERPROFILE%/SamsungCertificate

then delete the Cert folder (probably a good idea to back up first), then open the emulator again (I also opened the cert manager, but I think the cert folder was recreated when the emulator started and no more warnings/errors) then everything worked again.

However this seems to be something that keeps happening, if I find out why I’ll update this post.

Text to Speech on mobile with Xamarin

Previously I looked at Speech synthesis in Windows with C# but what about speech synthesis on mobile.

Xamarin.Essentials has this covered with the TextToSpeechTextToSpeech class and is included by default when creating a Xamarin Forms mobile application.

It’s really simple to add text to speech capabilities, we simply write code such as

await TextToSpeech.SpeakAsync("Hello World");

As you can see by the use of the await keyword (and the standard Async suffix), the SpeakAsync method returns a task. It also accepts a cancellation token if you need to cancel mid utterance. There’s also an overload which accepts SpeechOptions which allows us to set the volume, pitch and locale.

The second TextToSpeech method is GetLocalesAsync which allows is to get a list of supported locales from the device that can then be used within the SpeakAsync method’s SpeechOptions.

await TextToSpeech.GetLocalesAsync();

Note: It’s fun listening to the attempts at different accents depending upon the locale.

Changing the date/time on the Tizen emulator

To set the date/time on the Tizen emulator

  • Obviously ensure you have the emulator running
  • Right mouse click on the emulator
  • Select Shell
  • Type su to switch to super user or you’ll get an “Operation not permitted” error
  • The default password is tizen
  • Type date –set=”27 Mar 2020 23:59:45″ and press enter
  • Tizen is a Linux based OS, hence we can use Linux commands in the shell.

Adding a Tizen project to Xamarin Forms

The great thing about creating a Xamarin Forms project is that you can create projects for Android, iOS and UWP at the same time, but there’s no options for Tizen.

Assuming we’re installed the Tizen Visual Studio templates, then it’s easy to add Tizen to an existing Xamarin Forms project and have it use the shared code project.

Assuming you’ve already created a Mobile App (Xamarin.Forms) application (mine’s called MyProject) and selected Android, iOS and UWP, now…

  • From File | New | Project select the Tizen XAML App (Xamarin.Forms) project, name the project along the lines of MyProject.Tizen
  • After you click Create you’ll be presented with the Tizen Project Wizard
  • Select Common (if not already selected) and leave Mobile, TV etc. options unchecked
  • Select the option Select Project in Solution and choose the shared project name, i.e. ours is MyProject
  • Click OK

Now you’ll see the Tizen project and it’s already set up to use your project’s shared code. So we can write our XAML for all four platforms. Obviously if we’re aiming to deploy to a watch (for example) we’ll need to optimise the XAML for this type of device. We use OnIdiom, for example

FontSize="{OnIdiom Watch=Small, Phone=Large}

and we’re done.