Android Question Close voice recognition when there is no match

Almog

Active Member
Licensed User
Hello,

I tried to make the voice recognition to close when there is no match by intent.https://developer.android.com/reference/android/speech/RecognizerIntent.html#RESULT_NO_MATCH

B4X:
Dim i As Intent
VR.Initialize("vr")
i.Initialize("android.speech.action.RECOGNIZE_SPEECH", "")
i.PutExtra("android.speech.extra.RESULT_NO_MATCH", 1000)
VR.Listen2(i)

but it's not working - when there is no match the voice recognition prompt that there is no match, and I need to press to try again (I want the voice recognition dialog to close when there is no match...)

Does anybody know how to make the voice recognition dialog to close when there is no match?

Thanks in advance.
 

DonManfred

Expert
Licensed User
Longtime User
RESULT_NO_MATCH is nothing to put in extras. See documentation. It is one of the resultcodes of a speechrecognizer call.

Result code returned when no matches are found for the given speech
 
Upvote 0

Almog

Active Member
Licensed User
RESULT_NO_MATCH is nothing to put in extras. See documentation. It is one of the resultcodes of a speechrecognizer call.
Thank you! do you know if there is a way to do it anyway? (make the VR dialog close when there is no match)
Thanks in advance
 
Upvote 0
Top