mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
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:
parent
f2a9165b7c
commit
fb4c6f9d48
|
@ -176,10 +176,12 @@ public abstract class ResultHandler {
|
||||||
sendEmailFromUri("mailto:" + address, subject, body);
|
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) {
|
public final void sendEmailFromUri(String uri, String subject, String body) {
|
||||||
Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(uri));
|
Intent intent = new Intent(Intent.ACTION_SEND, Uri.parse(uri));
|
||||||
putExtra(intent, "subject", subject);
|
putExtra(intent, Intent.EXTRA_SUBJECT, subject);
|
||||||
putExtra(intent, "body", body);
|
putExtra(intent, Intent.EXTRA_TEXT, body);
|
||||||
|
intent.setType("text/plain");
|
||||||
launchIntent(intent);
|
launchIntent(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue