Aniket Shinde
Aniket Shinde

Reputation: 350

How can you send what's app messages programmatically in android?

I am trying to implement a functionality similar to what Pushbullet does i.e reply to whats app messages programmatically without entering WhatsApp.

Any help will be appreciated, Thanks.

Upvotes: 1

Views: 6949

Answers (3)

Huzifa Terkawi
Huzifa Terkawi

Reputation: 126

Careful : it's illegal take a look at library : https://github.com/tgalal/yowsup

Upvotes: 0

bashizip
bashizip

Reputation: 581

You cannot do it without entering whatsapp contact chosser screen, whatsapp doesnt provide any api for that.

See : WhatsApp Api Integration with Android

But you can bypass the system app chooser by using this Intent:

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "My text to send.");
sendIntent.setType("text/plain");
sendIntent.setPackage("com.whatsapp");
startActivity(sendIntent);

Upvotes: 1

barwnikk
barwnikk

Reputation: 976

Look: https://www.whatsapp.com/faq/android/28000012 What's app doesn't have sdk, so without entering to What's App you can't.

Upvotes: 2

Related Questions