I want to send an image by whatsapp to a specific phone number without having to access the image gallery and within the contact's chat.
Now what I do is the following:
Intent intent = new intent();
intent.setaction(Intent.ACTION_SEND);
intent.setPackage("com.whatsapp");
intent.setData(Uri.Parse("https://api.whatsapp.com/send?phone=+333333"))
intent.setType("image/*");
intent.putExtra(Intent.EXTRA_STREAM,Uri.parse("/storange/emulate/0/imagen.png"));
startActivity(intent);
with this code I achieve almost everything. The image is loaded but it leaves me out of the chat. I have to choose the user. It does not read the intent.Setdata and does not enter the contact's chat. (that is, it leaves me out of the chat and I need you to enter to just press the send button and that's it). I hope you can help me