In my attempts to troubleshoot a android.speech.SpeechRecognizer.ERROR_CLIENT
error in my app, I set breakpoints in
They are mainly due to unresolved symbols:
CodePudding user response:
Well, after some more experimentation, I discovered that placing a breakpoint inside SpeechRecognizer.java
does break when reached:
I did that by going down the stacktrace:
This tells me that the elusive Log.e(TAG, "cancel() failed", e);
is perhaps never gets called. But that is a different issue.
In the meanwhile, it looks like the only way to tell which of the 9 candidates for ERROR_CLIENT is the root cause, would be to attempt to spot and track the stacktrace thrown by a NetworkSpeechRecognizer
exception:
W Recognizer network error
at com.google.android.apps.speech.tts.googletts.service.GoogleTTSRecognitionService.onCancel(PG:6)
at android.speech.RecognitionService.dispatchCancel(RecognitionService.java:185)
at android.speech.RecognitionService.-$$Nest$mdispatchCancel(Unknown Source:0)
at android.speech.RecognitionService$1.handleMessage(RecognitionService.java:110)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)