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

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

问题描述

我想发送消息正文为我在哪里?"的短信.当我点击我在哪里?"时,它会将我带到包含我所在位置的谷歌地图网站.我的问题是如何在我在哪里?"中添加这个超链接.消息文本?有没有我可以学习的例子?

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.

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

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