Android - How do I create an email body from a file that contains css and html?

那年仲夏 提交于 2019-12-25 05:38:24

问题


I have looked and found lots of great answers on how to load html into a body of an email Intent, but couldn't find how to load a file that contain css and html. I have a program that shows a webview where I display the file using:

webView.loadUrl("file://" + htmlManager.htmlFilePath(HtmlManager.myHtmlFile));

I have the email loading html using

Uri data = Uri.parse("mailto:?subject=" + subject + "&body=" + Html.fromHtml(htmlString));

but can I use the same file I used for the loadUrl for the body of the email?


回答1:


According to this site css is not able to be rendered in android email bodies

http://www.campaignmonitor.com/css/



来源:https://stackoverflow.com/questions/16344468/android-how-do-i-create-an-email-body-from-a-file-that-contains-css-and-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!