Android examples for android.speech:RecognizerIntent
is ACTION RECOGNIZE SPEECH Available
import java.util.List; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.speech.RecognizerIntent; public class Main{ public static boolean isTTSAvailable(Context context) { PackageManager packageManager = context.getPackageManager(); Intent speechIntent = new Intent( RecognizerIntent.ACTION_RECOGNIZE_SPEECH); List<ResolveInfo> speechActivities = packageManager .queryIntentActivities(speechIntent, 0); if (speechActivities.size() != 0) return true; return false; }// w ww.java 2s.co m }