title: Voice to text: No Activity found to handle Intent
body: <p>I am trying to use google search to text engine but it is not possible and get error :</p>
  
  <p>android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.speech.action.RECOGNIZE_SPEECH (has extras)</p>
  
  <p>Can you help me?</p>
  
  <p>Here is my MainActivity.java code</p>
  
  <pre><code>public class MainActivity extends Activity {
  private static final int REQUEST_CODE = 1234;
  Button Start;
  TextView Speech;
  Dialog match_text_dialog;
  ListView textlist;
  ArrayList&lt;String&gt; matches_text;
     @Override
     protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Start = (Button)findViewById(R.id.start_reg) 
        Speech = (TextView)findViewById(R.id.speech);
  
        Start.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
           if(isConnected()){
           Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
           intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
           RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
           startActivityForResult(intent, REQUEST_CODE);  
                   }
          else{   
              Toast.makeText(getApplicationContext(), "Plese Connect to Internet", Toast.LENGTH_LONG).show();
        }}
      });
   }
      public  boolean isConnected()
      {
         ConnectivityManager cm = (ConnectivityManager)    getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo net = cm.getActiveNetworkInfo();
       if (net!=null &amp;&amp; net.isAvailable() &amp;&amp; net.isConnected()) {
       return true;
       } else {
        return false;
       }
       }
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
       if (requestCode == REQUEST_CODE &amp;&amp; resultCode == RESULT_OK) {
       match_text_dialog = new Dialog(MainActivity.this);
       match_text_dialog.setContentView(R.layout.dialog_matches_frag);
       match_text_dialog.setTitle("Select Matching Text");
       textlist = (ListView)match_text_dialog.findViewById(R.id.list);
       matches_text = data
       .getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
       ArrayAdapter&lt;String&gt; adapter =    new ArrayAdapter&lt;String&gt;(this,
         android.R.layout.simple_list_item_1, matches_text);
       textlist.setAdapter(adapter);
       textlist.setOnItemClickListener(new AdapterView.OnItemClickListener() {
       @Override
       public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                           int position, long id) {
       Speech.setText("You have said " +matches_text.get(position));
       match_text_dialog.hide();
       }
    });
       match_text_dialog.show();
       }
       super.onActivityResult(requestCode, resultCode, data);
      }
  }
  </code></pre>
  
  <p>and this is AndroidManifest.xml code</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.learn2crack.speech"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="15"
      android:targetSdkVersion="19" /&gt;
  
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name="com.learn2crack.speech.MainActivity"
          android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>