Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Getting started with Udoo
  • Toc
  • feedback
Getting started with Udoo

Getting started with Udoo

By : Emanuele Palazzetti
4.8 (4)
close
Getting started with Udoo

Getting started with Udoo

4.8 (4)
By: Emanuele Palazzetti

Overview of this book

If you are an Android developer who wants to learn how to use UDOO to build Android applications that are capable of interacting with their surrounding environment, then this book is ideal for you. Learning UDOO is the next great step to start building your first real-world prototypes powered by the Android operating system.
Table of Contents (10 chapters)
close
9
Index

Improving user interaction with voice synthesis


Even if the Chronotherm application is working correctly, we have at least one more thing to do: providing proper feedback to let users know the action that was taken. Indeed, both activities fail to provide any visual feedback about what the recognized input is; for this reason, we decided to introduce the voice synthesis API within the initial design.

Because we want to share the synthesis procedure across different activities, we could create a manager that abstracts the synthesis API with a common initialization. The idea is to provide a class that exposes the method to start voice recognition with the given string; we implement it in the following steps:

  1. Create the VoiceManager class inside the voice package.

  2. Initialize the class with the following code:

    public class VoiceManager implements TextToSpeech.OnInitListener {
      private TextToSpeech mTts;
      //...
    }

    This class implements the OnInitListener interface that defines the callback that should...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete