Lines Matching full:code
37 <p>A successful check will be marked by a <code>CHECK_VOICE_DATA_PASS</code>
38 result code, indicating this device is ready to speak, after the creation of
47 <code>onActivityResult()</code> would look like:</p>
66 <p>In the constructor of the <code>TextToSpeech</code> instance we pass a
67 reference to the <code>Context</code> to be used (here the current Activity),
68 and to an <code>OnInitListener</code> (here our Activity as well). This listener
84 use <code>isLanguageAvailable()</code>, which returns the level of support for
98 <p>will return <code>TextToSpeech.LANG_AVAILABLE</code>. In the first example,
102 <p>Also note that besides the <code>ACTION_CHECK_TTS_DATA</code> intent to check
104 <code>isLanguageAvailable()</code> once you have created your
105 <code>TextToSpeech</code> instance, which will return
106 <code>TextToSpeech.LANG_MISSING_DATA</code> if the required resources are not
113 <code>TextToSpeech</code> instance. Also if you are using
114 <code>Locale.getDefault()</code> to query the current Locale, make sure that at
119 <p>Now that our <code>TextToSpeech</code> instance is properly initialized and
121 so is to use the <code>speak()</code> method. Let's iterate on the following
130 are also known as "utterances". Each <code>TextToSpeech</code> instance can
132 current one and which one is simply queued. Here the first <code>speak()</code>
136 <code>myText1</code> has completed.</p>
144 <code>AudioManager.STREAM_ALARM</code> stream type so that it respects the alarm
158 <p>Note that <code>speak()</code> calls are asynchronous, so they will return
160 of the use of <code>QUEUE_FLUSH</code> or <code>QUEUE_ADD</code>. But you might
162 want to start playing an annoying music after <code>myText2</code> has finished
166 <code>TextToSpeech.OnUtteranceCompletedListener</code> interface:</p>
188 <p>While the <code>speak()</code> method is used to make Android speak the text
193 file whenever needed. Just like for <code>speak()</code>, you can use an
207 <p>But the <code>TextToSpeech</code> class offers other ways of associating
213 <code>addSpeech()</code> methods:</p>
218 <code>wakeUpText</code> will result in the playback of
219 <code>destFileName</code>. If the file is missing, then speak will behave as if
224 line in your Activity code to ask repeatedly "Are you up yet?":</p>
231 services anymore" by calling <code>mTts.shutdown()</code>, in your Activity
232 <code>onDestroy()</code> method for instance.</p>