I am developing an android app and I need to send a message to specific contact from WhatsApp. I tried this code:
Uri mUri = Uri.parse(\"smsto:+999999999\");
This new method, send message to a specific contact via whatsapp in Android. For more information look here
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_VIEW);
String url = "https://api.whatsapp.com/send?phone=" + number + "&text=" + path;
sendIntent.setData(Uri.parse(url));
activity.startActivity(sendIntent);here