如何在Android手机中的短信中添加超链接? [英] how do I add a hyperlink in sms message in android phone?

查看:951
本文介绍了如何在Android手机中的短信中添加超链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想发送一条带有消息正文的短信,比如我在哪里?当我点击我在哪里?时,
,它将带我到我的位置谷歌地图网站。
我的问题是如何在我在哪里?中添加此超链接。消息文本?
有没有可以学习的例子?

I want to send a sms message with the message body like "where am I?" when I click "where am I?", it will take me to the google map website with my location. My question is that how can I add this hyperlink in the "where am I?" message text? Is there any example that I can study?

推荐答案

短信是纯文字的,只允许160个字符。您建议的内容包括160个字符中的我在哪里?,但也包含一个非常长的网址。

SMSes are text-only, and they only allow 160 characters. What you are suggesting would include 'where am I?' in the 160 characters but also somehow include a very long web address.

您可能想要做的第一件事就是利用某种URL缩短服务。我没有一个我可以亲自推荐的应用程序,但有一些Django应用程序,以及可以通过API(如bit.ly)挂钩的在线服务。这将为您提供一个独特的链接,可以轻松适应短信的可用字符。

The first thing you might want to do is make use of some sort of URL-shortening service. I don't have one that I can personally recommend but there are Django apps, among other things, and online services that you can hook into with an API (like bit.ly). That will get you a unique link to easily fit in the available characters of an SMS.

大多数智能手机将解析链接并使其可点击,即使它在短信中。因此,例如,您可以将文本读取:

Most smart phones will parse a link and make it 'clickable', even if it is in an SMS. So, for example, you could make the text read:

Where am I? www.linkgoesh.ere/somehash 

用户应该可以点击链接并访问您的网站。它并不像你所建议的那样优雅,但SMS是一种(必然)限制格式。

The user should be able to click on the link and visit your website. It's not as elegant as what you're suggesting, but SMS is a (necessarily) limited format.

这篇关于如何在Android手机中的短信中添加超链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆