I have a basic handler set up to call the email application in the emulator and send an email. I’ve set up the email app in the emulator with my info so it’s ready to go. However, when I click the button in my app to bring up a compose window I get the prompt that says:
“No applications can perform this action”
Is this just something you can’t do with the emulator?
private OnClickListener submitBtn = new OnClickListener(){
public void onClick(View v){
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
String emailTo = "test@test.com";
String emailSubject = "Subject";
String emailBody = "Some HTML goes here.";
emailIntent.setType("text/html");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,emailTo);
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,emailSubject);
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(emailBody));
startActivity(Intent.createChooser(emailIntent, "Send email in:"));
}
};
Try a third party app such as K9Mail http://code.google.com/p/k9mail/
The code looks fine, you’re hitting some emulator limitations…