MailTo

public final class MailTo


MailTo URI parser. Replacement for android.net.MailTo.

This class parses a mailto scheme URI and then can be queried for the parsed parameters. This implements RFC 6068.

Note: scheme name matching is case-sensitive, unlike the formal RFC. As a result, you should always ensure that you write your URI with the scheme using lower case letters, and normalize any URIs you receive from outside of Android to ensure the scheme is lower case.

Summary

Constants

static final String

Public constructors

Public methods

@Nullable String

Retrieve the BCC address line from the parsed mailto URI.

@Nullable String

Retrieve the body line from the parsed mailto URI.

@Nullable String

Retrieve the CC address line from the parsed mailto URI.

@Nullable Map<StringString>

Retrieve all the parsed email headers from the mailto URI

@Nullable String

Retrieve the subject line from the parsed mailto URI.

@Nullable String

Retrieve the To address line from the parsed mailto URI.

static boolean

Test to see if the given string is a mailto URI

static boolean

Test to see if the given Uri is a mailto URI

static @NonNull MailTo

Parse and decode a mailto scheme string.

static @NonNull MailTo

Parse and decode a mailto scheme Uri.

@NonNull @Override String

Constants

MAILTO_SCHEME

public static final String MAILTO_SCHEME

Public constructors

MailTo

public final MailTo()

Public methods

getBcc

public @Nullable String getBcc()

Retrieve the BCC address line from the parsed mailto URI. This could be several email address that are comma-space delimited. If no BCC line was specified, then null is return

Returns