Implicit Intent - Share data with other application

btnImplicit.setOnClickListener {
val enteredText: String = txtUserMsg.text.toString()
val intent = Intent()
intent.setAction(Intent.ACTION_SEND)
intent.putExtra(Intent.EXTRA_TEXT, enteredText)
intent.type = "text/plain"

startActivity(Intent.createChooser(intent, "Share With"))
}

Comments

Popular posts from this blog

Android - Using KeyStore to encrypt and decrypt the data

Stack and Queue

Java Reflection API