title: How to replace the deprecated setOnUtteranceCompletedListener
body: <p>I have this code     </p>
  
  <pre><code> else {
              int listenerResult = tts
                      .setOnUtteranceCompletedListener(new OnUtteranceCompletedListener() {
                          @Override
                          public void onUtteranceCompleted(String utteranceId) {
                              callWithResult.onDone(utteranceId);
                          }
                      });
              if (listenerResult != TextToSpeech.SUCCESS) {
                  Log.e(TAG, "failed to add utterance completed listener");
              }
          }
  </code></pre>
  
  <p>Unfortunately since API 18 <code>setOnUtteranceCompletedListener</code> has been deprecated.</p>
  
  <p>Android Developer site say to replace with <code>UtteranceProgressListener</code>, but I haven't understand how should I edit my code mantaining the same behaviour.  </p>