I try to use a TextToSpeech in my app,
String text = editText.getText().toString(); tts.speak(text, TextToSpeech.QUEUE_FLUSH, null);
But the fu
String text = editText.getText().toString(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { tts.speak(text,TextToSpeech.QUEUE_FLUSH,null,null); } else { tts.speak(text, TextToSpeech.QUEUE_FLUSH, null); }