0

I want to create an android app from which I can post text to whatsApp from my contacts. I refered a lot of links nothing is clear. No clarification regarding any API or not.

Finally I got venomous0x/WhatsAPI.

They say that its an API. But I am unable to import it into my Eclipse workplace. How can I do this? Any alternatives? Please help me guys!!

Jaiprakash Soni
  • 4,100
  • 5
  • 36
  • 67
androidGenX
  • 1,108
  • 3
  • 18
  • 44

1 Answers1

1

For future readers i have done it like this: for ref WhatsApp doc

you can share directly to WhatsApp or hike etc and bypass the system picker, you can do so by using setPackage in your intent.

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);
Garg
  • 2,731
  • 2
  • 36
  • 47