I want to share image and text like:
Intent intent = new Intent(Intent.ACTION_VIEW);
Uri u = Uri.parse(url);
i.setData(u);
startActivity(intent);
I want to share image and text like:
Intent intent = new Intent(Intent.ACTION_VIEW);
Uri u = Uri.parse(url);
i.setData(u);
startActivity(intent);
Kindly find the below code.
Uri path= Uri.parse("android.resource://" + this.getPackageName()
+ "/drawable/" + "image_name");
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_TEXT, "Testing");
shareIntent.putExtra(Intent.EXTRA_STREAM, path);
shareIntent.setType("image/*");
shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(Intent.createChooser(shareIntent, "Share Using"));