Reputation: 237
I create the app with button "Sending". When I pressed this button, the app must show me a list of email-clients from mobile. How do I make that? Thank you for, anyway.
Upvotes: 0
Views: 87
Reputation: 5391
Use intents. Check out the following code. It should do the trick.
String subject = "Subject text goes here.";
String body = "Body text goes here"
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, body);
startActivity(Intent.createChooser(email, "Send Mail..."));
Upvotes: 1