/[zanavi_public1]/navit/navit/android/src/com/zoffcc/applications/zanavi/NavitSpeech2.java
ZANavi

Diff of /navit/navit/android/src/com/zoffcc/applications/zanavi/NavitSpeech2.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 26 Revision 27
45import android.content.res.Configuration; 45import android.content.res.Configuration;
46import android.os.Bundle; 46import android.os.Bundle;
47import android.os.Message; 47import android.os.Message;
48import android.speech.tts.TextToSpeech; 48import android.speech.tts.TextToSpeech;
49import android.util.Log; 49import android.util.Log;
50import android.view.View;
50 51
51// new TTS, this is used now! 52// new TTS, this is used now!
52public class NavitSpeech2 implements TextToSpeech.OnInitListener, NavitActivityResult 53public class NavitSpeech2 implements TextToSpeech.OnInitListener, NavitActivityResult
53{ 54{
54 private static TextToSpeech mTts; 55 private static TextToSpeech mTts;
226 try 227 try
227 { 228 {
228 if (mTts != null) 229 if (mTts != null)
229 { 230 {
230 mTts.speak(what, TextToSpeech.QUEUE_FLUSH, null); 231 mTts.speak(what, TextToSpeech.QUEUE_FLUSH, null);
232 if (NavitGraphics.NavitMsgTv2_.getVisibility() == View.VISIBLE)
233 {
234 Navit.N_NavitGraphics.NavitMsgTv2_.append("SAY:" + what + "\n");
235 }
236 if (Navit.PREF_show_debug_messages)
237 {
231 Navit.set_debug_messages3(what); 238 Navit.set_debug_messages3(what);
239 }
232 } 240 }
233 } 241 }
234 catch (Exception e) 242 catch (Exception e)
235 { 243 {
236 e.printStackTrace(); 244 e.printStackTrace();

Legend:
Removed from v.26  
changed lines
  Added in v.27

   
Visit the ZANavi Wiki