Hi guys:
I have a situation where I allow the user to email a number of
documents from my app. The problem is that one request may result in
the sending of 3 or 4 emails. Ideally I would like to get all the SEND
info at the beginning and at a minimum populate all the fields so that
all the user has to do is hit SEND for the 2nd, 3rd, 4th etc email.
All is fine except that the email client seems to accept the email
address only when typed in manually: Below is a snippet of my email
routine:
private boolean emailInfo(File filename, String subject, String
body) {
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TITLE, "Extra Title");
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "subject");
sendIntent.putExtra(Intent.EXTRA_EMAIL, "[email protected]");
sendIntent.putExtra(Intent.EXTRA_TEXT, "body");
sendIntent.setType("text/csv");
sendIntent.putExtra(Intent.EXTRA_STREAM,
Uri.fromFile(filename));
sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
//startActivityForResult(Intent.createChooser(sendIntent, "Select
Mail Client"),101);
startActivityForResult(sendIntent,101);
return true;
}
The email address that I pass via:
sendIntent.putExtra(Intent.EXTRA_EMAIL, "[email protected]");
is always ignored and so it has to be manually entered on each email.
Any solution? Thanks in advance.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en