You should probably be adding some code to verify if the speech
recognition library is available on the device. Generally this is a
good practice for any external intent.

Here is a code segment that can help you out.

  // Check to see if a recognition activity is present
        PackageManager pm = context.getPackageManager();
        List<ResolveInfo> activities = pm.queryIntentActivities(
                new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH),
0);
        if (activities.size() == 0) {

              // At this point there is no recognition library and you
should handle it here

        }

I'm not sure how you can load the library into the API and I'm not
sure if the library is even publicly available.


On Mar 11, 8:07 am, Moto <medicalsou...@gmail.com> wrote:
> You might have to download the speech recognition?  I know google maps
> requires downloading voice app or something...
>
> On Feb 24, 4:34 am, Mukesh kumar <mukesh.j...@gmail.com> wrote:
>
>
>
> > how the emulator get activity:
> >   "android.speech.action.RECOGNIZE_SPEECH"
>
> > when we use code :
>
> > Intent intent = new Intent("android.speech.action.RECOGNIZE_SPEECH");
> > startActivityForResult(intent, 0);
>
> > it throw exception:
> > Exception:
> > android.content.ActivitNotFoundException:No Activity Found to handle
> > Intent{action=android.speech.action.RECOGNIZE_SPEECH}
>
> > AndroidMainfest.xml
>
> > <?xml version="1.0" encoding="utf-8"?>
> > <manifest xmlns:android="http://schemas.android.com/apk/res/android";
> > package="com.tutorial"
> > android:versionCode="1"
> > android:versionName="1.0">
> > <application android:icon="@drawable/icon" android:label="@string/
> > app_name">
>
> > <activity android:name=".SpeechActivtiy" android:label="@string/
> > hello">
> > <intent-filter>
> > <action android:name="android.intent.action.MAIN" />
> > <category android:name="android.intent.category.LAUNCHER" />
> > </intent-filter>
> > </activity>
> > </application>
> > <uses-sdk android:minSdkVersion="3" />
>
> > </manifest>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to