示例#1
0
        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            // TODO Auto-generated method stub

            if (requestCode == RESPONCERESULT && resultCode == Result.Ok)
            {
                IList <string> results      = data.GetStringArrayListExtra(RecognizerIntent.ExtraResults); //Get a result array list
                string         resultString = "";

                for (int i = 0; i < results.Count; i++)
                {
                    resultString = results[i];  //Transform the array list into a string
                }
                vtext.Append(resultString + "/" + StringURL.REG_W(resultString));
                vtext.Append("\n");
            }
            base.OnActivityResult(requestCode, resultCode, data);
        }
示例#2
0
        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            // TODO Auto-generated method stub

            if (requestCode == RESPONCERESULT && resultCode == Result.Ok)
            {
                IList <string> results      = data.GetStringArrayListExtra(RecognizerIntent.ExtraResults);
                string         resultString = "";

                for (int i = 0; i < results.Count; i++)
                {
                    resultString = results[i];
                }
                vt.Append(resultString + "\n");
                cv.Append(SocketClient.send(resultString + "/" + StringURL.REG_W(resultString)));   //Send the results to the server
                //cv.Append(SocketClient.receive() + "\n");   //Receive data from server
            }
            base.OnActivityResult(requestCode, resultCode, data);
        }