Hi, I am designing an app in which i need open an email client on clicking a button. The email client should be opened with pre defined subject and 'to' address. Is there a way to attain this??? Plz provide me the solution and code if possible...
+3
A:
Goes like this:
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("plain/text");
intent.putExtra(Intent.EXTRA_EMAIL, new String[] { "[email protected]" });
intent.putExtra(Intent.EXTRA_SUBJECT, "subject");
intent.putExtra(Intent.EXTRA_TEXT, "mail body");
startActivity(Intent.createChooser(intent, ""));
alex
2010-04-29 04:55:51
When i click the button its displaying that NO APPLCATIONS CAN PERFORM THIS ACTION.... Whats the solution???
Rahul Varma
2010-04-29 07:01:34
This will only work on a real device.
alex
2010-04-29 07:24:42
Is there any other way to open an email client in my emulator..????
Rahul Varma
2010-04-29 08:21:33
Not that I'm aware of.
alex
2010-04-29 19:04:56