diff --git a/CHANGELOG b/CHANGELOG index f0b0f5ac2..4ee2bb8d3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2.2 +FIX: Text To Speech issues on earlier Android versions + 2.1 FIX: Display of storage devices FIX: External SD cards detection diff --git a/src/org/kiwix/kiwixmobile/utils/KiwixTextToSpeech.java b/src/org/kiwix/kiwixmobile/utils/KiwixTextToSpeech.java index f79e92740..17d3b4eb7 100644 --- a/src/org/kiwix/kiwixmobile/utils/KiwixTextToSpeech.java +++ b/src/org/kiwix/kiwixmobile/utils/KiwixTextToSpeech.java @@ -78,6 +78,7 @@ public class KiwixTextToSpeech { currentTTSTask = null; } else if (tts.isSpeaking()) { if (tts.stop() == TextToSpeech.SUCCESS) { + tts.setOnUtteranceProgressListener(null); onSpeakingListener.onSpeakingEnded(); } } else { @@ -113,6 +114,7 @@ public class KiwixTextToSpeech { public void stop() { if (tts.stop() == TextToSpeech.SUCCESS) { currentTTSTask = null; + tts.setOnUtteranceProgressListener(null); onSpeakingListener.onSpeakingEnded(); } } @@ -186,6 +188,7 @@ public class KiwixTextToSpeech { public void pause() { paused = true; currentPiece.decrementAndGet(); + tts.setOnUtteranceProgressListener(null); tts.stop(); }