简体   繁体   English

如何在android中设置默认电子邮件客户端中的主题?

[英]How to set the subject in default email client in android?

I have set the default email as in code as, 我已将默认电子邮件设置为代码,

email.putExtra(Intent.EXTRA_EMAIL,new String[] { "support@example.com" });

I have to set the subject too, when i tried to set Intent.EXTRA_SUBJECT but I didnt get this . 当我试图设置Intent.EXTRA_SUBJECT但我没有得到这个时,我也必须设置主题。

Could someone help me on this. 有人可以帮我这个。

This is my earlier post and it works fine, take a look on it. 这是我之前的帖子,它工作正常,看看它。

Here's the code in your case: 这是您案例中的代码:

email.putExtra(android.content.Intent.EXTRA_SUBJECT, "Your subject here");

Hope it helps! 希望能帮助到你!

您感兴趣的实际情况是:

emailIntent .putExtra(android.content.Intent.EXTRA_SUBJECT, yourSubject);     

试试这个,希望它会有所帮助

intent.putExtra(Intent.EXTRA_SUBJECT,subject);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在不发送消息的情况下在Android中打开默认电子邮件客户端? - How to open default email client in Android, without sending a message? 如何以编程方式配置Android的默认电子邮件客户端 - How to configure the Android's default email client programatically 如何通过Android默认电子邮件客户端发送带有图像的html内容? - How to send html content with image through android default email client? Android默认电子邮件客户端的明确意图 - Explicit intent for Android default email client Android默认电子邮件客户端中的html支持 - html support in android default email client 如果在textview中设置了任何电子邮件,则如果单击,则打开默认电子邮件客户端 - if any email is set in textview then open the default email client if clicked 如何为默认Swagger Android客户端设置连接和套接字超时 - How to set connection and socket timeout for default swagger android client 如何在Android模拟器中提取到主题电子邮件等? - how to extract to, subject etc fron email in android emulator? 如何在电子邮件主题中发送有关android设备的信息 - how to send information about android device in email subject 获取默认设置的联系人电子邮件? Android以编程方式? - Get default set Email of contact? Android programatically?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM