大佬教程收集整理的这篇文章主要介绍了Android – 尝试发送电子邮件时收到错误“无应用程序可以执行此操作”?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
这是我的代码:
public void emailDialog() { AlertDialog.Builder alertDialog = new AlertDialog.Builder(this); alertDialog.setTitle("Feedback"); alertDialog.setMessage("Please tell us that what you feel about our product. If you are facing any problem or found any bug then please report to us. Your review is important to us. Thanks!!"); final EditText input = new EditText(this); input.setLines(8); alertDialog.setView(input); alertDialog.setPositiveButton("Ok",new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog,int whichButton) { String value = input.getText().toString(); String address = "varundroid@gmail.com"; String subject = "FeedBack"; final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,address); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,subject); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,value); CompleteTaskManager.this.startActivity(Intent.createChooser(emailIntent,"Send Email..")); } }); alertDialog.setNegativeButton("Cancel",new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog,int whichButton) { // Canceled. } }); alertDialog.show(); }
请帮忙.
emailIntent.setType("message/rfc822");
要么
emailIntent.setType("text/plain");
以上是大佬教程为你收集整理的Android – 尝试发送电子邮件时收到错误“无应用程序可以执行此操作”?全部内容,希望文章能够帮你解决Android – 尝试发送电子邮件时收到错误“无应用程序可以执行此操作”?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。