3.2 Implicit Intents
var sendIntent = Intent()
sendIntent.action = Intent.ACTION_SEND
sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage)
sendIntent.type = "text/plain"
// Verify that there is at least one app that can receive this action
if (sendIntent.resolveActivity(packageManager) != null) {
startActivity(sendIntent)
}Sending Data Through Intents
Last updated
Was this helpful?