You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is the relevant stacktrace
11:32:02.832 10831-10831/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: pro.i_surveillance.comfort_life_poc, PID: 10831
java.lang.RuntimeException: Unable to start activity ComponentInfo{pro.i_surveillance.comfort_life_poc/pro.i_surveillance.comfort_life_poc.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.speech.tts.TextToSpeech.setOnUtteranceProgressListener(android.speech.tts.UtteranceProgressListener)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2946)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3046)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1688)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6809)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.speech.tts.TextToSpeech.setOnUtteranceProgressListener(android.speech.tts.UtteranceProgressListener)' on a null object reference
at ai.snips.platform.TtsHandler.registerTtsUtteranceProgressListener(TtsHandler.kt:21)
at ai.snips.platform.TtsHandler.access$registerTtsUtteranceProgressListener(TtsHandler.kt:11)
at ai.snips.platform.TtsHandler$tts$1.onInit(TtsHandler.kt:14)
at android.speech.tts.TextToSpeech.dispatchOnInit(TextToSpeech.java:824)
at android.speech.tts.TextToSpeech.initTts(TextToSpeech.java:802)
at android.speech.tts.TextToSpeech.(TextToSpeech.java:733)
at android.speech.tts.TextToSpeech.(TextToSpeech.java:712)
at android.speech.tts.TextToSpeech.(TextToSpeech.java:696)
at ai.snips.platform.TtsHandler.(TtsHandler.kt:13)
at ai.snips.platform.SnipsPlatformClient.connect(SnipsPlatformClient.kt:173)
The text was updated successfully, but these errors were encountered:
I would suggest testing that the user has TTS installed on the device before trying to initiate Snips as it's a requirement for the Android Snips SDK. The demo doesn't check, so it will crash, but if you were building your own application, then you could add the logic.
Here is the relevant stacktrace
11:32:02.832 10831-10831/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: pro.i_surveillance.comfort_life_poc, PID: 10831
java.lang.RuntimeException: Unable to start activity ComponentInfo{pro.i_surveillance.comfort_life_poc/pro.i_surveillance.comfort_life_poc.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.speech.tts.TextToSpeech.setOnUtteranceProgressListener(android.speech.tts.UtteranceProgressListener)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2946)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3046)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1688)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6809)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.speech.tts.TextToSpeech.setOnUtteranceProgressListener(android.speech.tts.UtteranceProgressListener)' on a null object reference
at ai.snips.platform.TtsHandler.registerTtsUtteranceProgressListener(TtsHandler.kt:21)
at ai.snips.platform.TtsHandler.access$registerTtsUtteranceProgressListener(TtsHandler.kt:11)
at ai.snips.platform.TtsHandler$tts$1.onInit(TtsHandler.kt:14)
at android.speech.tts.TextToSpeech.dispatchOnInit(TextToSpeech.java:824)
at android.speech.tts.TextToSpeech.initTts(TextToSpeech.java:802)
at android.speech.tts.TextToSpeech.(TextToSpeech.java:733)
at android.speech.tts.TextToSpeech.(TextToSpeech.java:712)
at android.speech.tts.TextToSpeech.(TextToSpeech.java:696)
at ai.snips.platform.TtsHandler.(TtsHandler.kt:13)
at ai.snips.platform.SnipsPlatformClient.connect(SnipsPlatformClient.kt:173)
The text was updated successfully, but these errors were encountered: