
Getting started with Udoo
By :

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:
Create the VoiceManager
class inside the voice
package.
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...
Change the font size
Change margin width
Change background colour