如何使用HTML标签发送短信?(How to send SMS with HTML tags?)

编程入门 行业动态 更新时间:2024-10-25 09:34:41
如何使用HTML标签发送短信?(How to send SMS with HTML tags?)

我正在从我的java Web应用程序向Android和BB最终用户发送短信。 此消息包含一些HTML标记,如锚标记,粗体标记等。同样在移动端显示。 这是我必须编码的东西还是应该在移动设备上完成? 我是这个短信实施的新手。 有人可以帮助我吗?

提前致谢。

I am sending an sms from my java web application to Android and BB end user. This message has some HTML tags like anchor tag, bold tag etc. The same is getting displayed in the mobile end. Is it something I have to do encode or should it be done in mobile's end? I am new to this SMS implemenation. Can someone pls help me?

Thanks in advance.

最满意答案

我想你想要从你的应用程序编码而不是在移动端?

然后编码html。 我建议最好的html编码器是StringEscapeUtils

StringEscapeUtils.escapeHtml(htmlString)

如果你想从移动端做到这一点,那么使用Html.fromHtml(String source)

I guess you want to encode from your application and not in the mobile end ?

Then encode the html. I would suggest the best html encoder is StringEscapeUtils

StringEscapeUtils.escapeHtml(htmlString)

And if you want to do it from the mobile end then use Html.fromHtml (String source)

更多推荐

end,HTML,BB,电脑培训,计算机培训,IT培训"/> <meta name="description"

本文发布于:2023-07-18 11:43:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1159826.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   发送短信   标签   HTML   tags

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!