I am trying to implement text to speech by following this article on the Android Developers Blog. It suggests the following code for installing text to speech data if it is not supported.
Intent installIntent = new Intent();
installIntent.setAction(TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);
startActivity(installIntent);
This throws an Exception
:
ActivityNotFoundException
: No activity
found to handle Intent
However, I am using the code here to determine the the intent is actually supported. Here is the list representation:
[ResolveInfo{43cc5280 com.svox.pico.DownloadVoiceData p=0 o=0 m=0x108000}]
Why doesn't this work?
Update
I don't know why, but it seems to work now.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…