title: UtteranceProgressListener is not called always in Text to Speech?
body: <p>My code:</p>
  
  <pre><code>import java.math.BigInteger;
  import java.security.SecureRandom;
  import java.util.HashMap;
  import java.util.Locale;
  
  import android.annotation.SuppressLint;
  import android.annotation.TargetApi;
  import android.app.Activity;
  import android.os.Build;
  import android.os.Bundle;
  import android.speech.tts.TextToSpeech;
  import android.speech.tts.TextToSpeech.OnInitListener;
  import android.speech.tts.UtteranceProgressListener;
  import android.widget.Toast;
  
  @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1)
  @SuppressLint("NewApi")
  public class MainActivity extends Activity {
      public TextToSpeech tts;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          tts = new TextToSpeech(this, new ttsInitListener());
      }
      @SuppressLint("TrulyRandom") class ttsInitListener implements OnInitListener {
  
          @SuppressWarnings("deprecation")
          @Override
          public void onInit(int status) {
  
              if (status == TextToSpeech.SUCCESS) {
                  tts.setLanguage(Locale.getDefault());
                  if (!tts.isSpeaking()) {
                      SecureRandom random = new SecureRandom();
                      String aa= new BigInteger(130, random).toString(32);
                      HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
                      map.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, aa);
                      tts.speak("Hello Hello HEllo HEllo HEllo",
                              TextToSpeech.QUEUE_FLUSH, map);
                      tts.setOnUtteranceProgressListener(new ttsUtteranceListener());
                  }
  
              } else {
                  tts = null;
                  Toast.makeText(getApplicationContext(),
                          "Failed to initialize TTS engine.", Toast.LENGTH_SHORT)
                          .show();
              }
          }
      }
  
      class ttsUtteranceListener extends UtteranceProgressListener {
  
          @Override
          public void onDone(String utteranceId) {
  
              Toast.makeText(getApplicationContext(), "onDone", Toast.LENGTH_LONG).show();
  
          }
  
          @Override
          public void onError(String utteranceId) {
              Toast.makeText(getApplicationContext(), "onError", Toast.LENGTH_LONG).show();
          }
  
          @Override
          public void onStart(String utteranceId) {
              Toast.makeText(getApplicationContext(), "onStart", Toast.LENGTH_LONG).show();
          }
      }
  }
  </code></pre>
  
  <p>When speak</p>
  
  <pre><code>tts.speak("Hello Hello HEllo HEllo HEllo",
                                  TextToSpeech.QUEUE_FLUSH, map);
  </code></pre>
  
  <p>Finish then should call <code>onDone(String utteranceId)</code> method of <code>ttsUtteranceListener</code> class. but <code>ttsUtteranceListener</code> is not always reached.</p>
  
  <p>Why is this class not reached?</p>