tags:

views:

41

answers:

1

HI,

I have a textView of text email id, when i click the email id, i want to open a email app which is located in the device, and in the "To" address bar should be filled with the clicked email id, Any example or similar code will be a great helpful to me. Please help ?

+1  A: 

maybe this will help

final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);

emailIntent .setType("plain/text");
emailIntent .putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"[email protected]"});
emailIntent .putExtra(android.content.Intent.EXTRA_SUBJECT, mySubject);
emailIntent .putExtra(android.content.Intent.EXTRA_TEXT, myBodyText);

context.startActivity(Intent.createChooser(intent, "Send mail...));

stolen from link

Marco Schmid
Thanks for the reply, i want to open a mail box as like our desktop behaves, so that the user can compose the mail and can send or can't send, The behavior is look like same as our desktop application. If u didn't got the point i will explain more about this
ramsbh
yeah, it should do that. it opens the mail-application, sets the to-address to [email protected]. you can remove the lines with subject and the bodytext.
Marco Schmid