code: public static String getSpeechRecognitionFirstResult(int requestCode, int resultCode, Intent data) {
  		if (requestCode == 0 && resultCode == -1) {
  			List<String> results = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
  			if (results != null && results.size() > 0) {
  				return results.get(0);
  			}
  		}
  		return null;
  	}
docs: Get first result from the Google Speech Recognition activity (DO NOT FORGET call this function on
  onActivityResult())
  
  @param requestCode
  - onActivityResult request code
  @param resultCode
  - onActivityResult result code
  @param data
  - onActivityResult Intent data
  @return string containing the first result of what was recognized