[英]I tried to use intent email in my small android project but its not working. Can anyone help me to find the error?
public void submit_order(View view) { //For ORDER button EditText name_var = (EditText) findViewById(R.id.name); public void submit_order(View view) { //对于 ORDER 按钮 EditText name_var = (EditText) findViewById(R.id.name); field = name_var.getText().toString();
字段 = name_var.getText().toString();
Intent intent = new Intent(Intent.ACTION_SENDTO); // only email apps should handle this
intent.setData(Uri.parse("mailto:"));
intent.putExtra(Intent.EXTRA_SUBJECT, "Just Java order for " + field);
if (intent.resolveActivity(getPackageManager()) != null) {
startActivity(intent);
}
display_message(field, number_of_coffee);
}
先生,在 mailto 字符串中添加电子邮件地址。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.