Fix updating the number of installed voices after installing them within the activity.

This commit is contained in:
Reece H. Dunn
2013-10-14 15:12:23 +01:00
parent 4236fc48db
commit 8f82baa646
3 changed files with 27 additions and 9 deletions
@@ -51,6 +51,8 @@ import java.util.Locale;
*/
@SuppressLint("NewApi")
public class TtsService extends TextToSpeechService {
public static final String ESPEAK_INITIALIZED = "com.reecedunn.espeak.ESPEAK_INITIALIZED";
private static final String TAG = TtsService.class.getSimpleName();
private static final boolean DEBUG = false;
@@ -95,6 +97,9 @@ public class TtsService extends TextToSpeechService {
mEngine = new SpeechSynthesis(this, mSynthCallback);
mAvailableVoices = mEngine.getAvailableVoices();
final Intent intent = new Intent(ESPEAK_INITIALIZED);
sendBroadcast(intent);
}
@Override