Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
- private GoogleMap mMap;
- private TextToSpeech textToSpeech;
- public void SpeakForMe(String astr)
- {
- pikok = 3;
- textToSpeech.speak( astr, TextToSpeech.QUEUE_FLUSH, null, null); //with this line i get
- E/AndroidRuntime: FATAL EXCEPTION: main
- Process: com.navigationspeechclient, PID: 2021
- java.lang.NullPointerException: Attempt to invoke virtual method 'int android.speech.tts.TextToSpeech.speak(java.lang.CharSequence, int, android.os.Bundle, java.lang.String)' on a null object reference
- at com.navigationspeechclient.MapsActivity.SpeakForMe(MapsActivity.java:44)
- }
- int pikok;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement