Hi I am devloping an application for blind users so that I use very often text to speech as practicaly the only one method how to respond on user actions. I decided to make one
You don't need to use the ACTION_CHECK_TTS_DATA. Instead use isLanguageAvailable like this: (make sure to call this only after onInit is complete)
// check if language is available
switch (tts.isLanguageAvailable(locale))
{
case TextToSpeech.LANG_AVAILABLE:
case TextToSpeech.LANG_COUNTRY_AVAILABLE:
case TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE:
Log.d(TAG, "SUPPORTED");
break;
case TextToSpeech.LANG_MISSING_DATA:
Log.d(TAG, "MISSING_DATA");//launch the install data activity
break;
case TextToSpeech.LANG_NOT_SUPPORTED:
Log.d(TAG, "NOT SUPPORTED");//report failure
break;
}