I want to send the user to an email application, however I just want to set the recipient, the rest the user himself will fill in the application he chose and then send
What is it like?
I want to send the user to an email application, however I just want to set the recipient, the rest the user himself will fill in the application he chose and then send
What is it like?
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();
}
In this way the user can choose the desired APP to send the email, and will already open the APP with the completed email address