user1023445
user1023445

Reputation: 41

How to set the subject in default email client in android?

I have set the default email as in code as,

email.putExtra(Intent.EXTRA_EMAIL,new String[] { "[email protected]" });

I have to set the subject too, when i tried to set Intent.EXTRA_SUBJECT but I didnt get this .

Could someone help me on this.

Upvotes: 3

Views: 1869

Answers (3)

kameny
kameny

Reputation: 2370

This is my earlier post and it works fine, take a look on it.

Here's the code in your case:

email.putExtra(android.content.Intent.EXTRA_SUBJECT, "Your subject here");

Hope it helps!

Upvotes: 5

Kiran Babu
Kiran Babu

Reputation: 1893

Try this, Hope it will help

intent.putExtra(Intent.EXTRA_SUBJECT,subject);

Upvotes: 0

Quentin DOMMERC
Quentin DOMMERC

Reputation: 876

The acutal line that interest you is :

emailIntent .putExtra(android.content.Intent.EXTRA_SUBJECT, yourSubject);     

Upvotes: 1

Related Questions