title: how to get a single result from a voice recognizer with out "["and "]" in the start and the end of result
body: <p>i am using voice recognizer in my app. but i want a single result from the voice recognizer <strong>without</strong> the <strong>"["</strong> and <strong>"]"</strong> in the beginning and the end of the result provided by the voice recognizer.</p>
  
  <p>at present i have a code which gives me a single result but it give "[" and "]" in the front and in the end of the result which i obtain.</p>
  
  <p>please check my code make the possible correction and modifications and give a appropiate answer i am very new to android.</p>
  
  <p>code : <strong>MainActivity.java</strong></p>
  
  <pre><code>import java.util.ArrayList;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.speech.RecognizerIntent;
  import android.view.View;
  import android.widget.Button;
  import android.widget.TextView;
  
  public class MainActivity extends Activity {
  
  private static final int RECOGNIZER_EXAMPLE = 1001;
  private TextView tv;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      tv = (TextView) findViewById(R.id.text_result);
  
      //set up button listner 
  
      Button startButton = (Button) findViewById(R.id.trigger);
      startButton.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View arg0) {
              // TODO Auto-generated method stub
              Intent intent = 
                      new Intent (RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
  
              intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,   RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
              intent.putExtra(RecognizerIntent.EXTRA_PROMPT,"SAY A WORD OR PHRASE\nAND IT WILL BE SHOWN AS TEXT");
              intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 1);
              startActivityForResult(intent,RECOGNIZER_EXAMPLE);
  
          }
      });
  
  }
  
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      //use a switch statament for more than one request code check
  
      if(requestCode==RECOGNIZER_EXAMPLE &amp;&amp; resultCode==RESULT_OK) {
          //RETURNED DATA IS A LIST OF MATCHES TO THE SPEECH IPUT
          ArrayList&lt;String&gt; result = 
              data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
          tv.setText(result.toString());
      }
  
      super.onActivityResult(requestCode, resultCode, data);
  }
  }
  </code></pre>