I need the results from recognizer to be a string.. when i use this code i get eclipse error ‘cannot convert Array as string..
code: final ArrayList<String> results2 = data.getStringArrayListExtra (RecognizerIntent.EXTRA_RESULTS);
also tried, with no luck:
final String results2 = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
still says error..
Is this enough info?? Thank you in advance.
NEW: I added this code, but i want a .get that will store this word/text in acceptable manner for a cursor usage:
String[] matches = data.getStringArrayExtra(SpeechRecognizer.RESULTS_RECOGNITION);
Eclipse does not error , but my result is coming out as ‘null’ so i just need a .Get that works in my scenario?? Than kyou all for helping also!
you code should work fine. See this snippet:
What you can look is:
I can’t see any other
Edit: Since there is not enough code to look into, you can yourself look into speech sample here
If look there:
They are using
RecognizerIntent.EXTRA_RESULTS. Try this sample if it resolves your issue. As now your issue is different then what i look initially.