0

Am developing an android application which is automatically send the email, presently am using createChooser("email"). insted i need to open that application directly without the chooser. presently am using this code. and it is not sending to CC address also can any one help me to resolve it?

Intent email = new Intent(Intent.ACTION_SEND);
                    email.putExtra(Intent.EXTRA_EMAIL, new String[]{Prereg.this.editEmail.getText().toString()});
                    email.putExtra(Intent.EXTRA_CC, "CC to mail");
                    email.putExtra(Intent.EXTRA_SUBJECT, "Subject");
                    email.putExtra(Intent.EXTRA_TEXT, "Email Body");
                    email.setType("message/rfc822");
                    startActivity(Intent.createChooser(email, "Choose my SecureMail:"));
Henry
  • 42,982
  • 7
  • 68
  • 84

1 Answers1

0

If you know the package name of the app you want to start you can easily start that app with an Intent, have a look at this question.

Community
  • 1
  • 1
fweigl
  • 21,278
  • 20
  • 114
  • 205