Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
Uri imageUri = Uri.parse("android.resource://" + getPackageName()
+ "/drawable/" + "image");
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_TEXT, "Text");
shareIntent.putExtra(Intent.EXTRA_STREAM, imageUri);
shareIntent.setType("image/jpeg");
shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(Intent.createChooser(shareIntent, "send"));