title: TextToSpeech with API 21
body: <p>Can someone help me using TTS with API 21.
  All examples available are deprecated with version 21</p>
  
  <p>Here's my code giving error on last line:</p>
  
  <pre><code>Calendar cal = Calendar.getInstance();
                      cal.getTime();
                      SimpleDateFormat sdf = new SimpleDateFormat("HH:mm");
                      String text = sdf.toString();
                      btn.setText("Ouvir as Horas");
  
                      TextToSpeech tts = new TextToSpeech(NightClock.this,(TextToSpeech.OnInitListener) NightClock.this);
                      tts.setLanguage(Locale.US);
                      tts.speak(text, TextToSpeech.QUEUE_FLUSH, null);
  </code></pre>
  
  <p>In Android developers it says that this method is deprecated and replaced by this:</p>
  
  <blockquote>
    <p>speak(String text, int queueMode, HashMap params)
    This method was deprecated in API level 21. As of API level 21, replaced by speak(CharSequence, int, Bundle, String).</p>
  </blockquote>
  
  <p>Can someone help to code my app.</p>