i am trying to create an intent activity that sends an email. Using
public void emailSend(View view){
Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.setData(Uri.parse("mailto:"));
emailIntent.setType("plain/text");
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Nächstes Treffen");
emailIntent.putExtra(Intent.EXTRA_EMAIL,adressListe);
if (emailIntent.resolveActivity(getPackageManager()) != null){
startActivity(emailIntent);
}
}
offers me more than just the email apps. Using
public void emailSend(View view){
Intent emailIntent = new Intent(Intent.ACTION_SENDTO);
emailIntent.setData(Uri.parse("mailto:"));
emailIntent.setType("plain/text");
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Nächstes Treffen");
emailIntent.putExtra(Intent.EXTRA_EMAIL,adressListe);
if (emailIntent.resolveActivity(getPackageManager()) != null){
startActivity(emailIntent);
}
}
Nothing happens when i click the button. For
emailIntent.setType("plain/text");
is also tried
emailIntent.setType("messageage/rfc822");
and
emailIntent.setType("*/*");
all with varying results, but none only dislaying the email apps.
Do you have any idea how to solve this? Help would be greatly appreciated!
Thanks!