0
I want to send the user to an email application, but I just want to set the recipient, the rest the user himself will fill in the application he chose and then send
Has as?
0
I want to send the user to an email application, but I just want to set the recipient, the rest the user himself will fill in the application he chose and then send
Has as?
0
You can use this code below:
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/plain");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String\[\]{ "[email protected]"});
emailIntent.setType("message/rfc822");
try {
startActivity(Intent.createChooser(emailIntent, "Escolha o App desejado..."));
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(getActivity(), "Não há programas de email instalados.", Toast.LENGTH_SHORT).show();
}
This way the user will be able to choose the desired APP for sending the email, and will already open the APP with the email address filled
Browser other questions tagged java android email
You are not signed in. Login or sign up in order to post.
I work the way I wanted, thanks
– Costamilam
Could you help me with one more thing? The code works perfectly so it would be possible to have an option that defines a standard application?
– Costamilam