readText

fun readText(intent: Intent, activity: ComponentActivity? = null): String?

Returns text from the intent, checking EXTRA_TEXT, the app's text extra, ACTION_PROCESS_TEXT and finally a text-like data URI, or null.