title: No Apps can perform this action android
body: <p>I'm trying to make this program that when the user clicks a button, a message is sent to a whatsapp number</p>
  
  <p>Here is the code in the onClick method</p>
  
  <pre><code>            Uri uri = Uri.parse("smsto:" + "xxxxxxxxxx"); //xxx.. is the mobile number
              Intent i = new Intent(Intent.ACTION_SENDTO, uri);
              i.putExtra(Intent.EXTRA_TEXT, "Check");
              i.setType("text/plain");
              i.setPackage("com.whatsapp");
              startActivity(Intent.createChooser(i, ""));
  </code></pre>
  
  <p>It shows that there are no apps that can perform this action. Why?</p>
  
  <p>I removed </p>
  
  <pre><code>            i.setType("text/plain");
  </code></pre>
  
  <p>And it works. But the text "Check" is not sent. How to do that if this is not the way.</p>