I am building an application using android speech recognition intent. I have build the application, now I want to send the recognized outputs to local server so that I can view the output of the recognizer from any device connected to the same network. Below is my code:
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case REQ_CODE_SPEECH_INPUT: {
if (resultCode == RESULT_OK && null != data) {
ArrayList<String> result = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
mTextFromSpeech.setText(result.get(0));
String finalResult = result.get(0);
System.out.println("Detected Command Is: " + finalResult);
}
break;
}
}
}
I want to send the result from finalresult on local server, please help.