我目前正在开发一个 android 项目,我正在添加一个偏好,以便能够向我发送电子邮件。我正在使用ACTION_SENDTO
意图发送电子邮件,但它回来并说No apps can perform this action
。
下面是我正在使用的代码
Intent intent = new Intent(Intent.ACTION_SENDTO);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_EMAIL, "someone@example.com");
intent.putExtra(Intent.EXTRA_SUBJECT, "Check out this android app");
intent.putExtra(Intent.EXTRA_TEXT, "Check out this new app in the Google Play Store. Its from Boardies IT Solutions and is called Boardies Password Manager. You can find it at https://play.google.com/store/apps/details?id=com.BoardiesITSolutions.PasswordManager");
startActivity(Intent.createChooser(intent, "Send Email"));
感谢您的任何帮助,您可以提供