0

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.

Mihir Trivedi
  • 1,458
  • 18
  • 39
  • please have a look at this [question](https://stackoverflow.com/q/19796235/7948109) – Rahul Gaur Jan 20 '20 at 05:49
  • Hi. If you mean how to send http request, following article + another SO question might be helpful: https://stackoverflow.com/questions/3505930/make-an-http-request-with-android https://developer.android.com/training/volley/simple – Nobody Jan 20 '20 at 05:50

0 Answers0