protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
if (requestCode == REQUEST_CODE && resultCode == RESULT_OK)
{
// Populate the wordsList with the String values the recognition engine thought it heard
ArrayList<String> matches = data.getStringArrayListExtra(
RecognizerIntent.EXTRA_RESULTS);
wordsList.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,
matches));
}
super.onActivityResult(requestCode, resultCode, data);
}
im looking for the proper syntax to get the first position of this populated list to a string so i can put it in a toast or save it to a file, im new at this, if i can display it on a toast i can take care of the rest, thank you
Toast.makeText(this,(CharSequence) wordsList.getItemAtPosition(0) , Toast.LENGTH_LONG).show();
Pretty easy: