這裏用戶必須輸入他/她的姓名,年齡和消息。它必須打開Gmail應用程序,顯示輸入的名稱/年齡/消息。它只顯示MESSAGE。剩餘的細節我沒有得到它。
String s1= name.getText().toString();
String s2= age.getText().toString();
String s3= msg.getText().toString();
Intent email = new Intent(Intent.ACTION_SEND);
email.putExtra(Intent.EXTRA_EMAIL,
new String[] { "[email protected]" });
email.putExtra(Intent.EXTRA_SUBJECT,"hiiiii");
email.putExtra("Name", s1);
email.putExtra("Age", s2);
email.putExtra(Intent.EXTRA_TEXT, s3);
email.setType("message/rfc822");
startActivity(Intent.createChooser(email,"Choose an Email client :"));