嗨,我使用了以下代码来启动电子邮件客户端,但它仅启动消息应用程序...所以应该在此代码中修改哪些内容...
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] {"<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="403627332c6e2d212e2a3500272d21292c6e232f2d" rel="noreferrer noopener nofollow">[email protected]</a>"});
emailIntent.setType("text/plain");
startActivity(Intent.createChooser(emailIntent, "Send a mail ..."));
最佳答案
代码 fragment 看起来不错。 在实际设备上尝试一下,应该可以正常工作。
关于android - 从我的应用程序启动电子邮件客户端(android),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4242672/