Skip to content

Documentation: README.md: Usage: add Kotlin #13

@CharlesMAtkinson

Description

@CharlesMAtkinson

Based on my testing, the new information needs to be something like as follows.

If building with gradle, add this line to app/build.gradle.kts
implementation("de.cketti.mailto:email-intent-builder:2.0.0")

In the .kt file in which EmailIntentBuilder is called, need
import de.cketti.mailto.EmailIntentBuilder

Example function calling EmailIntentBuilder

    fun sendEmail(recipient: String, subject: String, body: String) {
        val success: Boolean = EmailIntentBuilder.from(this)
            .to(recipient)
            .subject(subject)
            .body(body)
            .start()
        if (!success) Log.e(TAG, "sendEmail: EmailIntentBuilder exception caught")
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions