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
This will be work but you need to mobile no. with country code like for India 91. eg. 91758XXXXXX2
String url = "https://api.whatsapp.com/send?phone=" + 91758XXXXXX2 + "&text=" + URLEncoder.encode("good morning", "UTF-8");
i.setPackage("com.whatsapp");
i.setData(Uri.parse(url));
if (i.resolveActivity(packageManager) != null) {
startActivity(i);
}