-
-
Save 5AbhishekSaxena/62990bd214a77165902b2d68c1e57102 to your computer and use it in GitHub Desktop.
Sharing intent utility function to start activity using intent.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun shareIntent(context: Context, sharingIntent: SharingIntent) { | |
val intent = sharingIntent.prepareIntent() | |
val shareIntent = Intent.createChooser(intent, sharingIntent.intentChooserTitle) | |
context.startActivity(shareIntent) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment