Inside a @Composable
you can use an Intent
in a standard way.
Something like:
val sendIntent: Intent = Intent().apply {
action = Intent.ACTION_SEND
putExtra(Intent.EXTRA_TEXT, "This is my text to send.")
type = "text/plain"
}
val shareIntent = Intent.createChooser(sendIntent, null)
val context = LocalContext.current
Button(onClick = {
context.startActivity(shareIntent)
}){
Text("Share")
}