Voice Recognizer not present
I try this code
PackageManager pm = getPackageManager();
List activities = pm.queryIntentActivities(
new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);
if (activities.size() != 0) {
speakButton.setOnClickListener(this);
} else {
speakButton.setEnabled(false);
speakButton.setText("Recognizer not present");
}
But the result it's Recognizer not present should i add any software to acti开发者_Go百科ce this service??
I answer my question. I installed "voice search" in the mobile with this code and this software need connection to work.
精彩评论