I am trying to run the following recognizer intent example that i have found in the official android developers page:
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/VoiceRecognition.html
My problem is that the activities that are extracted from the following code:
PackageManager pm = getPackageManager();
List activities = pm.queryIntentActivities(
new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);
is always an empty list. My guess was that that a permission was missing in the manifest thus i added the following:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO"></uses-permission>
<uses-permission android:name="android.permission.VOICE_RECOGNITION"></uses-permission>
<uses-permission android:name="android.permission.MIC"></uses-permission>
<uses-feature android:name="android.hardware.microphone" android:required="true" />
but still with no success. The emulator is Android 2.2 on mac.
Thank you in advance
If the list you get back is empty that means that there are no Activities installed that handle that Intent. Try on a real device.