Answer the question
In order to leave comments, you need to log in
Sending Email via Android. intent?
Hello. There was a need to send personal data. Naturally, I did it through Intent. Code below:
phone = phoneText.getText().toString(); //TextView с номером телефона
name = nameText.getText().toString(); //TextView с именем и фамилией
to = "my-mail.ru";
Intent email = new Intent(Intent.ACTION_SEND);
email.putExtra(Intent.EXTRA_EMAIL, new String[]{ to});
email.putExtra(Intent.EXTRA_SUBJECT, subject);
email.putExtra(Intent.EXTRA_TEXT, phone);
email.putExtra(Intent.EXTRA_TEXT, name);
email.setType("message/rfc822");
startActivity(Intent.createChooser(email, "Выберите email клиент :"));
break;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question