I want to check whether a specific language is downloaded or not on user's device for Android TextToSpeech.
I tried to do that:
private void checkVoiceData() {
if (ttsLang == TextToSpeech.LANG_MISSING_DATA
|| ttsLang == TextToSpeech.LANG_NOT_SUPPORTED
|| !(ttsLang == TextToSpeech.LANG_AVAILABLE)) {
Log.e("TTS", "The Language is not supported!");
Toast.makeText(PreviewActivity.this, "Open WI-Fi to Download the Language..", Toast.LENGTH_LONG).show();
}
}
but that didn't work. I think this code doesn't check that a language is downloaded or not, is there is a way to check that?