title: Auto Reply to WhatsApp message in background
body: <p>I just checking out the <a href="https://play.google.com/store/apps/details?id=tkstudio.autoresponderforwa&amp;hl=en_IN" rel="noreferrer">Application</a>, is doing auto reply to WhatsApp message in background. I also trying to doing so, but can't get success in it.
  I had tried :</p>
  
  <pre><code> Intent sendIntent = new Intent();
   sendIntent.setAction(Intent.ACTION_SEND);
   sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
   sendIntent.setType("text/plain");
   sendIntent.setPackage("com.whatsapp");
   startActivity(sendIntent);
  </code></pre>
  
  <p>But it opening the WhatsApp application :(, not sending the message.</p>
  
  <p>I go through with several links: <a href="https://stackoverflow.com/questions/29254370/how-to-send-message-to-whatsapp-to-specified-number-without-opening-whatsapp-app">Question1</a>, <a href="https://stackoverflow.com/questions/46788600/automatic-reply-for-whatsapp-messages-approach?noredirect=1&amp;lq=1">Question2</a> also <a href="https://medium.com/@polidea/how-to-respond-to-any-messaging-notification-on-android-7befa483e2d7" rel="noreferrer">article</a> on it but not getting satisfactory answer.</p>
  
  <p>The <a href="https://play.google.com/store/apps/details?id=tkstudio.autoresponderforwa&amp;hl=en_IN" rel="noreferrer">application</a> are accessing the notifications to get the messages, and replying to it, I also tried reading notifications using <code>NotificationListenerService</code>, and got success to read message :), but can't send reply to it, <strong>I want to know how they are sending the messages in the background without opening the application</strong>.</p>