abidibo.net

How to send short text messages from your U8 smartwatch

android smartwatch tasker u8

With this entry I should gain a mention from U8 boss, whoever he is.

It's a shame that the wrist dialer can transmit to the phone only ~ 40 numbers, otherwise all this stuff could be even more cool. But first things first...

Some one told you that your cheap and stupid smartwatch can't send text messages?

Well, he was wrong! At least a bit wrong. Actually you can send very short text messages from your wrist and here I'll tell you how.

Your Smartwatch Loves Tasker!

Since the whole post series about U8 smartwatch and tasker had a good following, I decided to write an entire e-book about the argument. In such book you'll find all the examples discussed here, plus something more. All the concepts and examples are discussed more comprehensively (with guided steps and screenshots), and Tasker is presented in a better way, allowing also the most unexperienced users to benfit of the idea behind this post.

Special introductory price: 3.79 € (epub and pdf)

Requirements

First of all you should read my previous entry about "How to get the best of your U8 smartwatch", where I explain how you can do fancy things with your U8 using tasker.

Secondly this method will be so cool for people who are at least maybe 25 year old.Well it's not a matter of age, but of your habit to write text messages with a nokia 3310, or any other phone pre-smartphones.

This is because I'm sure that all of us who had such ancient devices, can type a text message only with a number pad, am I wrong?

The concept

Nothing revolutionaruy here. The idea is to use the dialer to code our text message, letting us write it exactly as we did with our old phones.

The "code" pattern I've chosen is the following:

0* this is just an initial string I use to distinguish this functionality from others (the calculator, for example)
3456787900* this is the message receiver number, followed by an asterisk
844330833998 this is the encoded text ("the text")

Just some notes:

  • with you nokia 3310, when you need to type a letter in the same key of the previous, you had to wait a second, ore to use the arrow to move forward. We can't do such things with our dialer, so we'll type a #
  • The special symbols were associated to the key 1. I don't remember the exact order, so I've created my own version.
  • unfortunately it seems that the U8 can stream only 40 digits with the dialer, so be concise and use all these things I hate, like "how r u?", lol.

I wrote a javascript function which can decode such encoded text message, here it is:

Let's make an example ("see you at home at 11 PM"):

see u 23 hm 777733#330880222233330446

And to send it to the number 333678954 you should digit on your dialer:

0*333678954*777733#330880222233330446

It seems so strange to look at it, but I guess you'll fit right with this way of writing text messages through a number pad, the only exception here is the use of the hash to separate identical letters.

The tasker's task

The task we need to write is very similar to the ones we've seen in the other entries. We check that the called number starts with the desired code, then we parse it to get the phone number and the encoded text. The encoded text is decoded using the function above and then we send the text message and notify the wrist that the message X to the number Y was sent, so that if you wrote something disreputable you can repair calling immediately your contact, lol!

So here comes the descriptive task:

A1: If [ %CONUM ~R ^0\* ]
A2: End Call 
A3: JavaScriptlet [ Code:var numberStringToText; (function() { var dict = { '0': ' ', '00': '0', '1': '1', '11': ',', '111': '.', '1111': ':', '11111': '?', '111111': '!', '2': 'a', '22': 'b', '222': 'c', '2222': '2', '3': 'd', '33': 'e', '333': 'f', '3333': '3', '4': 'g', '44': 'h', '444': 'i', '4444': '4', '5': 'j', '55': 'k', '555': 'l', '5555': '5', '6': 'm', '66': 'n', '666': 'o', '6666': '6', '7': 'p', '77': 'q', '777': 'r', '7777': 's', '77777': '7', '8': 't', '88': 'u', '888': 'v', '8888': '8', '9': 'w', '99': 'x', '999': 'y', '9999': 'z', '99999': '9' }; numberStringToText = function(number) { var prev, text = ''; for(var i = 0, l = number.length; i < l; i++) { if(!prev) { prev = number[i]; } else if(number[i] == prev[0]) { prev += number[i]; if(i == l-1) { text += dict[prev]; } } else { text += dict[prev]; prev = number[i]!== '#' ? number[i] : ''; } } return text; } })();

var num = global("CONUM");
var rexp = new RegExp("0\\*([0-9]*)\\*([0-9#]*)"); 
var m = num.match(rexp);
var phone = m[1];
var msg = numberStringToText(m[2]); Libraries: Auto Exit:On Timeout (Seconds):45 ] 
A4: Send SMS [ Number:%phone Message:%msg Store In Messaging App:Off ] 
A5: Notify [ Title:Message sent Text:Number: %phone
Text: %msg Icon:null Number:0 Permanent:Off Priority:3 ] 
A6: End If 
A7: Stop [ With Error:Off Task: ] 

I've included the gist content directly into the javascriptlet, but if you prefer you can import it as an external library (but then you internet connection must be active)

Enhancements

The only limit I see here is the maximum number of digits supported by your wrist. So you could do something to better your encoding performance, for example you can code your favourite called numbers (1: girlfriend, 2: Jack, 3: sister...) and also some most used words, in order to limit the length of the encoded message.

You could create your own dictionary, I've studied a bit of information theory in my past physics career so I know you can write an efficient encoding algorithm calibrated on your most used words. The drawback is that you should learn a new language, while you already master the nokia 3310 one.

Conclusion

You can send short messages like "see u at hm" or "fuck u" or even something more useful directly from your wrist, using tasker, a bit of js and your historical memory about how to write sms with an ancient phone.

Hope you enjoy this entry, hasta la proxima!

Subscribe to abidibo.net!

If you want to stay up to date with new contents published on this blog, then just enter your email address, and you will receive blog updates! You can set you preferences and decide to receive emails only when articles are posted regarding a precise topic.

I promise, you'll never receive spam or advertising of any kind from this subscription, just content updates.

Subscribe to this blog

Comments are welcome!

blog comments powered by Disqus

Your Smartwatch Loves Tasker!

Your Smartwatch Loves Tasker!

Now available for purchase!

Featured