In my android app I want user to send app link via whatsapp to his friends. I was able to send message but I have to store receiver's phone number too so that if his friend(receiver) installs the app the sender will be rewarded. Here is my code for sending whatsapp message :
Intent waIntent = new Intent(Intent.ACTION_SEND);
waIntent.setType("text/plain");
String text = "link to app";
waIntent.setPackage("com.whatsapp");
if (waIntent != null) {
//waIntent.
waIntent.putExtra(Intent.EXTRA_TEXT, text);//
startActivity(Intent.createChooser(waIntent, "Share with"));
} else {
Toast.makeText(this, "WhatsApp not Installed", Toast.LENGTH_SHORT)
.show();
}
When user is done with sending the message, I want to store the receiver's phone number. What should I do for that? Also if there is any other way of doing referral via whatsapp then do tell.