Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send message to specific contact through whatsapp from another app

Tags:

android

Is it possible to send message to a specific contact through whatsapp directly from another app? I know the contact ID. I don't want to open whatsapp via Intent. I just want to send the message directly like normal sms.

i have tried other solutions posted on stackoverflow but they are not working for me.

like image 827
Naddy Avatar asked Oct 12 '13 20:10

Naddy


People also ask

Is there an app that can send automated WhatsApp messages?

Download the WhatsApp Message Scheduler app from the Play store. Grand accessibility access from Settings -> Accessibility -> Services & enable the toggle for the app. 2. Open the app & tap on the '+' icon.

Can WhatsApp be automated?

Use WhatsApp Automation to sync your WhatsApp API account with HubSpot and: Use the custom workflow action "Send WhatsApp Message" to Send Automated Alerts and Notifications to Customers on WhatsApp and provide updates and information in a quick and efficient manner.

How can I send message to WhatsApp API?

Install the WhatsApp Business API Client — Install your API client. Once your client is working, you can update your application settings. Start using the client — Register your phone number with an API call to /account and send a test message with a call to /messages .


1 Answers

Let me know if it works for you,

Uri mUri = Uri.parse("smsto:+9876543210");
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);
like image 51
Mehul Joisar Avatar answered Oct 03 '22 11:10

Mehul Joisar