Skip to content

Instantly share code, notes, and snippets.

@sjthn
Created January 27, 2017 18:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjthn/965d6cb70ce1e8903aa48ad51f1d4073 to your computer and use it in GitHub Desktop.
Save sjthn/965d6cb70ce1e8903aa48ad51f1d4073 to your computer and use it in GitHub Desktop.
Intent intent = ShareCompat.IntentBuilder.from(this)
.setType("image/png")
.setStream(imageUri)
.setChooserTitle("Choose image client")
.getIntent();
if (intent.resolveActivity(getPackageManager()) != null) {
startActivity(intent);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment