i need your help im developing a speech recognition app, which performs actions such as making a call, sending a message and the familiar stuff.. i managed to program the voice recognition in my app and it works great, but i cant seem to understand how to perform these actions, for example if i tell the app "call michael" , how is it done in coding? how to write calling action\sms action in code? i would really appreciate any help!
here is a code that describes how i get the word action from speech recognition:
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
//check speech recognition result
if (requestCode == VOICE_REC_CODE_REQUEST && resultCode == RESULT_OK)
{
//store the returned word list as an ArrayList
ArrayList<String> suggestedWords= data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
startExecutingActions(suggestedWords);
}
super.onActivityResult(requestCode, resultCode, data);
}
the question is, how do i execute these actions\commands like; call, send sms, search the web, navigate and more, and use them in startExecutingActions(suggestedWords) function?