List of usage examples for android.net MailTo MAILTO_SCHEME
String MAILTO_SCHEME
To view the source code for android.net MailTo MAILTO_SCHEME.
Click Source Link
From source file:Main.java
private static String makeEmailHerf(String content) { if (content.trim().length() == 0) { return content; }//from w w w . ja v a2 s . c o m StringBuffer emailStringBuffer = new StringBuffer(); Matcher matcherEmail = patternEmail.matcher(content); while (matcherEmail.find()) { String email = matcherEmail.group(); // System.out.println("email:" + email); String emailToHref = "<a href=\"" + MailTo.MAILTO_SCHEME + email + "\">" + email + "</a>"; matcherEmail.appendReplacement(emailStringBuffer, emailToHref); } matcherEmail.appendTail(emailStringBuffer); return emailStringBuffer.toString(); }
From source file:com.android.mail.utils.NotificationUtils.java
/** * Iterates through all senders and adds their respective Uris to the notifications. Each Uri * string consists of the prefix "mailto:" followed by the sender address. * @param notificationBuilder//from ww w.j a va2 s. c o m * @param senderAddressesSet List of unique senders to be tagged with the conversation */ private static void tagNotificationsWithPeople(NotificationCompat.Builder notificationBuilder, HashSet<String> senderAddressesSet) { for (final String sender : senderAddressesSet) { if (TextUtils.isEmpty(sender)) { continue; } // Tag a notification with a person using "mailto:<sender address>" notificationBuilder.addPerson(MailTo.MAILTO_SCHEME.concat(sender)); } }