question

parentlink avatar image
parentlink asked

ActivityNotFoundException for common Android intent

In my app, when you click on an email address, it launches the email app (which the user chooses if they have multiple). Standard "Intent.ACTION_SENDTO" intent with the data being the "mailto: ". It works fine on Froyo, Gingerbread, ICS, and Jelly Bean. But on the Kindle Fire HD, no activity can be found to handle intent. This is a basic email intent that has been around for years - and it works on the original Kindle Fire. What magical changes do I need to make to get this working on the HD?
fire tablet
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Offbeatmammal avatar image
Offbeatmammal answered
In my app on the HD I have the following code to configure and send an email String email = " email.address@url.com"; Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType("text/plain"); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{email}); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Email Subject Line"); Log.v("NOTICE", "Sending Email to: " + email); startActivity(emailIntent); If the user hasn't configured an email account then they won't be offered the dialog (though other apps such as Facebook and Twitter can also respond to it with varying degrees of success)
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Anshul@Amazon avatar image
Anshul@Amazon answered
Thank you Offbeatmammal. This will surely help other developers as well.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.