Search code examples
androidkindle-fire

Default Kindle Email app not in select list for ACTION_SEND and ACTION_SENDTO


I have working Android apps that allow the user to share content via the standard intent paradigm, but my ported code is not working on the Kindle Fire. In both below code snippets, the default Kindle Email app is not recognized as a handler of the intent.

The below gives me the "No applications can perform this action" message:

Intent intent = new Intent(android.content.Intent.ACTION_SENDTO);
String uriText;
uriText = "mailto:nobody@gmail.com";
Uri uri = Uri.parse(uriText);
intent.setData(uri);
startActivity(Intent.createChooser(intent, "Send email")); 

And my other attempt below, just presents Facebook and Lastpass as the only apps that can handle text/plain.

Intent intent2 = new Intent(android.content.Intent.ACTION_SEND);
intent2.putExtra(android.content.Intent.EXTRA_EMAIL, "nobody@gmail.com");
intent2.putExtra(android.content.Intent.EXTRA_SUBJECT, "Email subject");
intent2.putExtra(android.content.Intent.EXTRA_TEXT, "Email body text");
intent2.setType("text/plain");
startActivity(Intent.createChooser(intent2, "Send email")); 

Any thoughts?

Thanks Mike


Solution

  • Until the user has created a mail account the email application does not register to respond to the intent. Some third party email clients do preemptivly register as a handler, but it appears the built-in option only responds when there the user has created an account which leaves - often inappropriate - other clients like twitter, facebook or skype to respond to the event