Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CharlesMAtkinson opened this issue Nov 18, 2024 · 0 comments
Open

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

CharlesMAtkinson opened this issue Nov 18, 2024 · 0 comments

Comments

@CharlesMAtkinson
Copy link

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")
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant