Changed the Intent to send emails to address issue 145.

git-svn-id: https://zxing.googlecode.com/svn/trunk@847 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
dswitkin 2009-02-10 20:08:20 +00:00
parent f2a9165b7c
commit fb4c6f9d48

View file

@ -176,10 +176,12 @@ public abstract class ResultHandler {
sendEmailFromUri("mailto:" + address, subject, body);
}
// Use public Intent fields rather than private GMail app fields to specify subject and body.
public final void sendEmailFromUri(String uri, String subject, String body) {
Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(uri));
putExtra(intent, "subject", subject);
putExtra(intent, "body", body);
Intent intent = new Intent(Intent.ACTION_SEND, Uri.parse(uri));
putExtra(intent, Intent.EXTRA_SUBJECT, subject);
putExtra(intent, Intent.EXTRA_TEXT, body);
intent.setType("text/plain");
launchIntent(intent);
}