title: How to send message to a number from my android app via whatsapp?
body: <p>I have made an android app on android studio, from that application I want to send a message to a number but via whatsapp. The number is not in my contact list. I have tried the following code found on stackoverflow:</p>
  
  <pre><code>Uri mUri = Uri.parse("smsto:+999999999");
  Intent mIntent = new Intent(Intent.ACTION_SENDTO, mUri);
  mIntent.setPackage("com.whatsapp");
  mIntent.putExtra("sms_body", "The text goes here");
  mIntent.putExtra("chat",true);
  startActivity(mIntent);
  </code></pre>
  
  <p>But it throws an exception "Activity not found".</p>
  
  <p>I have also found one code but it opens the chat screen which I don't want means the user should only get a toast that message is sent and not any other
  screen.</p>
  
  <p>If anybody has a solution please let me know.</p>