How can we send an image directly to whatsapp from android app? I tried using
Bitmap b = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher);
Uri imageuri = getImageUri(getApplicationContext(), b);
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.setPackage("com.whatsapp");
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.putExtra(Intent.EXTRA_STREAM, imageuri);
sendIntent.setType("image/*");
startActivity(sendIntent);
the above code opens send window of whatsapp. Is there any other way so that image will directly be sent without opening whats app window?