Android Question VR Error cause?

JohnC

Expert
Licensed User
Longtime User
My App's crash statistics are reporting a lot of the below errors that seem to be with the VR feature:

B4X:
java.lang.RuntimeException:

1.   at anywheresoftware.b4a.phone.Phone$VoiceRecognition.Listen (Phone.java:904)
2.   at com.omnisoft.voiceit.main$ResumableSub_RecognizeVoice.resume (main.java:2431)

Is this because a user may not have the VR feature on their phone? (I thought every android phone had VR), or
Could this be because there is no internet connection for VR to work?

What is the suggested way to handle this error to the user?
 

canalrun

Well-Known Member
Licensed User
Longtime User
My App's crash statistics are reporting a lot of the below errors that seem to be with the VR feature:

B4X:
java.lang.RuntimeException:

1.   at anywheresoftware.b4a.phone.Phone$VoiceRecognition.Listen (Phone.java:904)
2.   at com.omnisoft.voiceit.main$ResumableSub_RecognizeVoice.resume (main.java:2431)

Is this because a user may not have the VR feature on their phone? (I thought every android phone had VR), or
Could this be because there is no internet connection for VR to work?

What is the suggested way to handle this error to the user?

I also use Voice Recognition in apps. I've had these apps for a few years.

Without an Internet connection, the voice recognizer will use local built-in recognition. I believe Android needs a "language pack" for the language in question, but I think this may be installed automatically for the default language - put your phone in "Airplane Mode" and try to perform Voice Recognition.

Over the last couple of years I may have seen a similar error once or twice. I convinced myself that something like the following was happening:
  • The user starts voice recognition, but is interrupted by a phone call or text message.
  • While the user is away the Voice Recognizer times out and the Recognizer activity (or process, or whatever the proper name is) is destroyed.
  • My app returns expecting the Voice Recognizer to be valid, but it has been destroyed. Crash!

This is only a guess, but it seems plausible.

I notice "ResumeableSub" as part of the error message you are getting. Maybe this is causing something similar?

Barry.
 
Upvote 0
Top