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, anyw开发者_如何学JAVAay.
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..."));
精彩评论