Has anyone managed to include the recipients email...
# android
z
Has anyone managed to include the recipients email address when using
ACTION_SENDTO
in Android 12? The code is identical to the official documentation and has worked flawlessly before Android 12.
😶 2
👍 1
For reference, this is what my code looks like. Prior to Android 12, the default email app is launched and the email-address is specified, the same thing happens on Android 12 but without the email-address filled in.
Copy code
private fun createIntent(
    metadata: String
): Intent {
    val uri = Uri.parse("mailto:")

    return Intent(ACTION_SENDTO)
        .setData(uri)
        .putExtra(
            EXTRA_EMAIL,
            arrayOf(EMAIL)
        )
        .putExtra(
            EXTRA_SUBJECT,
            TITLE
        )
        .putExtra(
            EXTRA_TEXT,
            metadata
        )
}