Using voice recognization feature in android crashes application -


i new stackoverflow , beginner in android programming. developing app control led via android phone of arduino , bluetooth adapter , working fine. trying add voice recognization feature, app gets crashed every time use feature. below code using receiving voice input. please suggest correction:

@override protected void onactivityresult(int requestcode, int resultcode, intent data) {      super.onactivityresult(requestcode, resultcode, data);     if (requestcode == result_speech && resultcode == result_ok) {         string check = data                 .getstringextra(recognizerintent.extra_results);         toastit("what said",check); //just toast messages         checkthatvoice(check);     }  }  private void checkthatvoice(string check) {      if (check.equals("bulb 1 on")) {         senddata("1");//sends 1 function further use, works fine     }  } 


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -