Skip to content

Instantly share code, notes, and snippets.

@JuniiiSays
Created September 29, 2022 16:50
Show Gist options
  • Save JuniiiSays/560368b7006705e6edc528d153d83e38 to your computer and use it in GitHub Desktop.
Save JuniiiSays/560368b7006705e6edc528d153d83e38 to your computer and use it in GitHub Desktop.
How to share data through Intent?
String textThatYouWantToShare = "Hello There!";
String mimeType = "text/plain";
String title = "Learning How to Share";
ShareCompat.IntentBuilder
.from(this)
.setType(mimeType)
.setChooserTitle(title)
.setText(textThatYouWantToShare)
.startChooser();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment