Make my activity one of the mail apps shown in the intent chooser?

As you can see from the Mail application's source having your application catch the intent is as simple as adding the intent-filter to your AndroidManifest. Xml inside your mail composition activity definition intent-filter.

As you can see from the Mail application's source, having your application catch the intent is as simple as adding the intent-filter to your AndroidManifest. Xml inside your mail composition activity definition. You can see that the tag specifies to handle mailto: links.

The BROWSABLE category means it can be launched from the browser. K-9 Mail is similar, except using the SENDTO action only with the DEFAULT category, and the VIEW action only with the BROWSABLE category.

– George Bailey Oct 7 '10 at 19:51 @cjavapro Updated my answer with examples from both the Mail app and K-9. – Andrew Koester Oct 7 '10 at 20:57 Works perfectly! Thanks!

Also thanks for the link to the mail app source. I should be able to find the compose layout xml to answer my other question – George Bailey Oct 7 '10 at 21:24.

You need to use an Intent Filter. Check out developer.android.com/guide/topics/inten... for more information. You usually declare these in your manifest file.

The intent I believe you're looking for is Intent. ACTION_SEND.

I am presuming that you are using the ACTION_SEND Intent action, since you did not bother to actually state what you're using, but you agreed with @Aleadam's comment. I'm using the application/octet-stream as the SetType for the Intent. Nothing in that sentence limits things to email.

ACTION_SEND is a generic Intent action that can be supported by any application that wants to. All you do is indicate what data you are sharing and the MIME type of that data -- from there, it is up to the user to choose from available activities. As @Jasoon indicates, you can try message/rfc822 as the MIME type.

However, that is not indicating "only offer email clients" -- it indicates "offer anything that supports message/rfc822 data". That could readily include some application that are not email clients. If you specifically want to send something by email, integrate JavaMail into your app, or write an email forwarding script on your Web server and invoke it, or something.

If you use ACTION_SEND, you are implicitly stating that it is what the user wants that matters, and you want the user to be able to send such-and-so data by whatever means the user chooses.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions