Skip to content

Instantly share code, notes, and snippets.

@rsicarelli
Created November 7, 2016 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rsicarelli/bdd28e2250f8685ce55b7498e48d7c80 to your computer and use it in GitHub Desktop.
Save rsicarelli/bdd28e2250f8685ce55b7498e48d7c80 to your computer and use it in GitHub Desktop.
public void shareImage(String text, Uri imageUri) {
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, imageUri);
shareIntent.setType("image/*");
activity.startActivity(Intent.createChooser(shareIntent, text));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment