1 |
Intent
i = new Intent(Intent.ACTION_SEND); |
2 |
//i.setType("text/plain");
//use this line for testing in the emulator |
3 |
i.setType( "message/rfc822" )
; //
use from live device |
4 |
i.putExtra(Intent.EXTRA_EMAIL, new String[]{ "test@gmail.com" }); |
5 |
i.putExtra(Intent.EXTRA_SUBJECT, "subject
goes here" ); |
6 |
i.putExtra(Intent.EXTRA_TEXT, "body
goes here" ); |
7 |
startActivity(Intent.createChooser(i, "Select
email application." )); |