Android sms url link

With a bit of HTML, it’s possible to create a hyperlink that sends an SMS message. You can even prepopulate the SMS body text via the link! Here’s how.

Links need no introduction. They’re everywhere on the internet, literally. In HTML, links are defined with the tag. They also contain an href attribute that specifies where the link should, well, link to. Many developers know that they can launch an email using “href=”mailto: [email protected] .” You can also start a phone call using “href=”tel:+1954123555.” But few people know that you can launch the SMS app on your website visitors’ phones with an HTML link. This is perfect for starting conversations with your customers, especially when you consider that you can add a Click to Text link to more than just text.

Start Sending Texts Today

No credit card required

Add Click to Text to the following places, or anywhere you may include an HTML link:

  • Your site’s drop-down menu or main navigation
  • Your contact page
  • Images
  • Call to Action text
  • Buttons
  • Email signatures

It only take a couple of minutes to create an HTML link that sends a text. And you can even pre-populate the SMS body text via the HTML link. Here’s how:

This is the text that your website visitors will read and click on. Keep it simple, and be sure to make it clear what will happen when they click. For example, “Click here to send us a text.”

2. Write Your Default SMS Message

When visitors click on your link, their SMS app will be launched with a pre-written message. Consider who your users are, what they’re looking for, and why they’re communicating with you. Then go ahead and write your default message. A restaurant, for example, may want to use the message, “Hi there, I’d like to place an order for…” Be sure to place your message through a URL encoder.

Now that you have the link text and SMS message written, it’s time to put the two together. If you’ve ever added an HTML link to your website, the process for creating a Click to Text link is exactly the same. Set up your href attribute like this:

💡SimpleTexting Tip: Gmail and Outlook strip HREF tags, so in order to circumvent any SMS protocol related speed bumps, try to use an email service like MailChimp!

Free Click-to-Text Button Generator

What’s better than sending SMS texts from a link? Sending them from an attention-grabbing button.

We make it unbelievably easy for you to add a button to your site that launches your customer’s native text messaging app. Our free click-to-text button generator also allows you to prewrite the SMS and prefill your contact details.

The best part is that this tool requires no design or coding experience. Everything from the prewritten SMS to the icon to the font-type is easily customizable. Once you are happy with your creation, all you have to do is paste the automatically generated code into the footer of the pages where you want your button to appear.

Get a click-to-text button on your website in 10-minutes. (You don’t even need to be a SimpleTexting customer.)

Free Mobile Sign-Up Widget

Click-to-text buttons are great for providing SMS customer service or generating inbound sales inquiries. However, if you want an easy way to promote your keyword, then consider our free mobile sign-up widget.

When visitors click on the button, it opens up a pop-up graphic that provides more details about your promotional SMS program. When vistors click on the pop-up, your customer’s native text messaging app is opened, with the keyword typed out and your contact details prefilled.

Similarly to the click-to-text button, everything is 100% customizable. No need to take our word for how easy it is to build, try it out today.

As with all new technologies, there are still some discrepancies across operating systems and devices. Even though many desktops and laptops are capable of sending SMS messages, these links work best on mobile devices. We recommend hiding your Click to Text link on desktop. Some versions of iOS don’t accept pre-written messages. Use an analytics tool to determine what OS the majority of your visitors use, then adjust accordingly.

Читайте также:  Прослушивать андроида с айфона

Should You Add Texting to Your Website?

In most cases, the answer is yes. The internet is slowly coming around to the realization that consumers prefer communicating with brands via text message. Still, updating your website with a text-enabled number is a big decision. If you have any doubts or need help getting set up, reach out to our support team by clicking the blue chat bubble in the corner of your screen. We’re here for you.

Never miss a beat!

Stay up to date on the latest marketing trends, tactics, and strategies when you subscribe to our weekly newsletter.

Источник

Share

What if I said there is a way to reach your customers anywhere in the world at the touch of a button? It may seem like a bold claim but 3.8 billion smartphones are circulating the globe as we speak and the number is on the rise every year. From the back-pocket to the office, a simple SMS link can go a long way and can go even further for the growth of your business.

Sending SMS links to customers is the way forward for startups and fortune 500 companies alike. The best part? — it’s easy, really easy. Every app, website or survey is a linkable-item. Read on to discover more about using SMS links.


Here are a few examples of what those might look like:


“Hi Mike, thanks for signing up, you can download the Verigator app at
https://tinyurl.com/y8qz586q

“Hi Kate, the API documentation can be found at https://tinyurl.com/ybtxzwlz, let us know if you have any questions at support@messente.com”

As the standard SMS length is only 160 characters and most links are pretty long (usually between 40 to 100 characters), they can eat up the necessary space in your message. As well as contain characters that may lead to even longer messages due to those characters being from the Unicode character set.

Therefore we suggest using an URL shortening tool, which helps make long links and hyperlinks shorter (as highlighted in the examples above). Plus, most of the URL shortening tools on the market provide you with additional feedback on how many clicks were made and where they came from.

This helps with both the SMS length issue as well as provides some data to measure the effectiveness of your SMS campaigns sent through an SMS API.

Here is a selection of different URL shortening service providers that we recommend:

To make sure that no additional issues arise with message length or wrong characters, feel free to use our SMS length calculator to ensure that your text fits into a single message.

While there isn’t a single approach to this, there are criteria that should be taken into consideration when using link shorteners.

When there is a spam-related filtering system applied, there is a far larger likelihood that the non-branded URLs might not get delivered. Though no actual rule is implemented. This is because the bit.ly type URLs have been used for spam and phishing purposes.

The filtering itself is very market dependent and follows the trends that the market has overall (e.g. EU markets being more strict), though the non-branded ones might still be fine if the accounts themselves are whitelisted beforehand.

Although using non-branded shortened links might still work, we strongly recommend using branded links. This will reduce delivery problems and lessens the need for whitelisting links.

While hyperlinks may sound more impressive, they are useless on many outdated devices. However, IOS 10 and IOS 11 mobiles have a preview feature to indicate what the content on the link looks like. The preview contains an image, title and short description.

You can use regular links for any text or SMS message or a shortened URL, both of these will work on any mobile device. Still confused about the difference? Below we compare the main differences between links and hyperlinks.

Links and hyperlinks both play the same role — directing you to a website. However, a hyperlink looks different.

A hyperlink is coloured and underlined and usually comes in the form of a single word or phrase. A link is the entire URL of the website or domain.

A customer receiving a link via a text on their phone is more likely to visit it. In 2021 things move fast and harnessing SMS is not only a more direct form of accessing a message but also a more appealing one.

You have two options:

Type the SMS link in manually

Copy and paste the URL into your SMS text

If you type the URL in, most platforms will recognise it and automatically convert it to the blue underlined text that is recognized as a link. This is where the shortened URL comes into play, pairing this with the copy and paste feature mentioned above can result in quite the powerhouse of SMS linking abilities — being able to access near infinite customer mobiles with a single click. Hence our next topic, Click Through Rate or CTR.

Читайте также:  Ich io nsfw android

What is Click Through Rate (CTR)?

SMS links create an opportunity to send a user or customer to a product or page. The question naturally arises, how do I find out how many people clicked my link? — The answer is a helpful metric known as the CTR. It comes from taking your number of clicks and dividing it by the number of messages delivered, then multiplying it by 100 to get the percentage.

You send 250 messages out to people’s mobiles and the link was clicked 100 times.

To find the CTR, Use this formula:

If you multiply 0.4 by 100 it will give you the percentage of people that clicked on your link. Using our example, 40% of the people you sent an SMS to clicked on the link you sent them.

How to track Click Through Rate (CTR)?

Once your URL is shortened and sharpened, it is now time to observe the link as it flourishes which can be done live and in real-time. You can track SMS clicks through the Analytics menu. Or if you are a Google Analytics person, simply view your SMS analytics through the Campaigns tab.

Google Analytics offers a detailed breakdown of your SMS campaign which may allow you to visualise your SMS success clearer and even foresee trends.

1. Reach new audiences

If expanding your business is your aim, SMS links will aid you in your ventures. Text-like campaigns can recruit customers and spread like wildfire, especially if you target trends.

2. Notify customers

Alerts, reminders and events all fall under the list of notifications you can send to your customers. A new product range hitting your marketplace can shine through your outreaching efforts via a text message.

3. Spread the news

Word spreads fast, but not as fast as SMS links. Daily news can be easily linked via SMS and even more easily accessed on a mobile device.

4. Share updates

It’s the ease of access that is so appealing. Let’s say you are offering a summer sale of 50% off all products on your website. By the time your email notification enters their mailbox, it has already been carefully filed into the junk tab. SMS is more intimate and has a more personal vibe than emails.

How many times does the “Average Joe” sift through emails per day? The answer- not a lot. Let’s be honest, it gets boring. More than half of all Americans check their phones 160 times a day. The power of business exposure lies within the mobile — a text message isn’t as hassling and provides a more organic way to connect to your target audience.

Linking content via SMS is a must in 2021 if you want to expand and grow. Utilising our tips will grant you an extra tool in your outreach arsenal.

Источник

XMPP-SMS шлюз на Android

Введение

Причиной написания данной статьи послужила необходимость создания программы для системы Android, с помощью которой можно отправлять данные заказа в виде SMS сообщений владельцам интернет магазинов о том, что был совершен заказ товаров или услуг. Ранее мною использовалась система включающая GSM-модем и программу написанную на языке С++, использовавшая AT-команды для общения с модемом и библиотеку gloox для получения сообщений по протоколу XMPP, на стороне web-сайта использовалась библиотека xmpphp, для отправки данных заказа. При такой схеме приходилось держать включенным компьютер постоянно, так как система приема заказов работала круглосуточно, соответственно отсюда дополнительный расход электроэнергии, шум от вентиляторов ночью и постоянный контроль интернет соединения.

Основной задачей программы, которую мы будем создавать на протяжении статьи, является получение сообщения определенного формата, по протоколу XMPP и последующая передача полученных данных через SMS. Средой разработки будет являться Eclipse с установленным плагином ADT и необходимыми SDK. Для взаимодействия по протоколу XMPP будет использоваться библиотека SMACK для Android устройств.

1. Отправка SMS сообщения

Сначала создадим каркас нашего приложения, который в последующем будем наращивать необходимым функционалом. Для этого создадим в Eclipse, Android Project (Ctrl+N – Android – Android Project) со следующими данными:

После создания нового проекта, добавим необходимое разрешение (Permission) в файле AndroidManifest.xml для возможности отправки SMS сообщений. Для этого в среде разработки Eclipse открываем файл AndroidManifest.xml, переходим на вкладку Permissions, нажимаем кнопку «Add…», в появившемся окне выбираем пункт «Uses Permission», нажимаем кнопку «OK», далее появиться возможность выбора разрешения, в списке находим и выбираем пункт android.permission.SEND_SMS, сохраняем наши действия. После всех манипуляций вкладка Permissions будет выглядеть следующим образом:

Теперь, для примера рассмотрим самый простой способ отправки SMS сообщения, протестировать который можно в обычном эмуляторе Android. Для этого создадим два новых виртуальных устройства, с помощью менеджера виртуальных устройств Android (Window – AVD Manager) со следующими параметрами:

В созданном нами проекте, в методе onCreate добавим следующий код:

Далее запускаем оба эмулятора Android, каждый из которых будет иметь собственный номер для проверки отправки и приема SMS сообщений, когда завершиться запуск и инициализации эмуляторов, нужно запустить наше приложение на эмуляторе с номером 5554, после запуска приложения, эмулятор с номером 5556 получит наше SMS сообщение.

Читайте также:  Eset nod32 mobile security для андроид

Отправка SMS сообщения осуществлялась с помощью класс SmsManager, который позволяет в системе Android производить необходимые действия с SMS сообщениям. Для инициализации объекта данного класса, использовался статический метод SmsManager.getDefault(). Отправка SMS сообщения производится при помощи метода sendTextMessage, где параметрами метода являются:

destinationAddress – Номер, на который отправляется сообщение;
scAddress – Номер SMS-центра вашего оператора сотовой связи, через который происходит передача сообщения, если данный параметр имеет нулевое значение, тогда используется номер по умолчанию;
text – Текст SMS сообщения;
sentIntent – Если не нулевое значение, то в данный параметр передается объект PendingIntent, для получения сообщений о результате отправки сообщения;
deliveryIntent – Если не нулевое значение, то в данный параметр передается объект PendingIntent, для получения сообщений о результате доставки сообщения.

Эмулятор Android прекрасно справляется с возложенными на него задачами, но имеет ряд ограничений, например, проверить результат доставки сообщения на нем не возможно, для этого придется использовать реальное устройство, что и будет сделано в дальнейшем. Так же при отправке сообщения с помощью метода sendTextMessage, длина его не может превышать 160 символов. Для более длинных сообщений необходимо использовать метод sendMultipartTextMessage, который в свою очередь так же позволяет отправлять сообщения длиной менее 160 символов.
В приведенном выше примере, мы не получаем уведомлений об отправке SMS сообщения и его доставки получателю, поэтому расширим функционал приложения добавив необходимые обработки. Для этого в приложении необходимо зарегистрировать два приемника широковещательных намерений, которые будут обрабатывать необходимые намерения и выводит на экран соответствующие текстовые сообщения.

В редакторе ресурсов добавим к нашему основному окну приложения виджет TextView, для вывода информации на экран.

Код приложения после внесения изменений примет следующий вид:

Для тестирования отправки сообщений и получения уведомления о доставке, на реальном устройстве, можно использовать ваш собственный номер сотового, тогда вы сможете в полной мере протестировать приложение. На рисунке ниже, изображена отправка и прием длинного сообщения.

2. Создание службы для работы по протоколу XMPP

Теперь необходимо добавим к нашему приложению возможность взаимодействия по протоколу XMPP. Для этих целей создадим службу (Service) которая будет работать в фоновом режиме. Служба при помощи библиотеки SMACK, будет принимать и обрабатывать сообщения. Далее с помощью широковещательных намерений данные из полученного сообщения буду передаваться в основной класс приложения, для вывода на экран и последующей передаче через SMS.

Для того чтобы добавить службу в наше приложение, необходимо определить для нее класс реализации, для этого в среде разработки Eclipse, необходимо нажать правой кнопки мыши по имени пакета проекта, в появившемся меню выбрать пункт New и Class, как показано на рисунке:

В появившемся окне заполняем необходимые пункты, указанные на изображении и нажимаем кнопку «Finish»:

После этих действий в проекте появиться реализация класса, далее необходимо зарегистрировать класс службы в файле AndroidManifest.xml, для этого открываем файл в среде разработки Eclipse, переходим на вкладку Application и в разделе Application Nodes нажимаем кнопку «Add», в появившемся окне выбираем пункт Service и нажимаем кнопку «OK». После необходимо указать имя класса службы, после всех манипуляций вкладка Application будет выглядеть следующим образом:

Теперь добавим еще одно разрешение для приложения, чтобы оно могло выходить в Интернет, для этого проделайте те же действия что и выше для разрешения по отправке SMS сообщения, только в этот раз выберите android.permission.INTERNET.

Следующим шагом будет добавление библиотеки SMACK к приложению, скачайте ее по адресу http://code.google.com/p/asmack/ сохраните в папке проекта, далее откройте свойства проекта, для этого нажмите правой кнопкой мыши на имени проекта в среде разработки Eclipse, в появившемся меню выберите пункт Properties. В появившемся окне настроек проекта, выберите в левом списке, пункт Java Build Path, после нажмите кнопку «Add External JARs…», найдите ранее сохраненную библиотеку в папке проекта и добавьте ее. После добавления внешней библиотеки окно настроек примет следующий вид:

Ниже приведен исходный код службы, как видно в методе onCreate создается отдельный поток, в котором происходит основная работа по взаимодействию по протоколу XMPP при помощи библиотеки SMACK. Полученные сообщения, а так же иные состояние службы передаются при помощи отправки широковещательных намерений.

Для обработки широковещательных намерений полученных от службы, необходимо зарегистрировать еще один приемник широковещательных намерений, для этого в метод onCreate основного класса приложения добавим следующий код:

Как видно из приведенного кода, для отправки SMS, обрабатываются сообщения, которые имеют тип номер_телефон@текст_сообщения, например:

Для запуска службы, в основном классе приложения в метод onCreate, добавим строку:

Для остановки службы, в основном классе приложения в методе onDestroy, добавим строку:

Теперь попробуем запустить приложение в эмуляторе и через любой IM-клиент отправим сообщение определенного типа. Результат показан на изображении:

Заключение

Данная статья является ознакомительной и рассчитана на начинающих программистов, коим являюсь сам. Созданное приложение имеет ряд недостатков и ограничений, например отправка SMS сообщения будет осуществляться только когда главное окно приложения активно. Отсутствует проверка на наличие доступа в Интернет, так же если выход в Интернет осуществляется только через WI-FI, то когда устройство переходит в спящий режим, происходит отключение WI-FI, для экономии заряда батареи. Данную проблему можно избежать при помощи приложения Wi-Fi Keep Alive либо добавив данный функционал к приложению самостоятельно. Отсутствует ведение журнала принятых и отправленных сообщений.

Круг применения данного приложения довольно широк, от получения уведомлений о заказе до создания полноценного SMS шлюза по обработке различных данных.

Источник

Оцените статью