Links From My Computer to My Droid

As much as I like screwing around with my Droid X, I would never actively choose to surf the webs with my droid over my computer. Who would? It just takes so much longer to type, and don't get me started talking about voice recognition for urls, blech! Still, I do want to get my rss feeds on my phone, so I can casually keep up with important events like Charlie Sheen's most recent dada statements. Still in the process of getting the little droid organized the way I want it, before I decide to brick it trying to install liberty.

In the process of setting up my rss feeds, I realized the slow pain of finding the correct urls and then applying them into my rss reader. So I decided to look up the urls on my laptop and then...what? After finding my first feed from The Electronic Intifada (let me have it all you Zionists), I realized getting that link to my phone was just as much a pain in the ass as it would have been looking it up on the droid to begin with. So I decided to figure out at least one way to accomplish the task with relative ease. If you run Windows or Mac OS's, you can stop reading now.

First things first, you need to have the QR Droid app. I decided it would be cool to be able to pass links from my computer to my phone in one quick move. Seemed like a cool thing to do and it turns out to be pretty easy as well. Other than the above app, you'll also need a few packages installed for this method to work:

  • imagemagick
  • qrencode

You will want to run the following on your debian based machine.

$ sudo apt-get install imagemagick qrencode

After downloading those packages, I started experimenting with ways to get an encoded display to appear the way I wanted. qrencode writes text into an image file, so I needed a way to display the image file after writing it. You can do this with a simple command one liner like this:


$ qrencode http://example.org -o qr-link.jpg | display qr-link.jpg

Now you can boot up your QR Droid app, choose the camera option, take a picture of the display on your screen and save that link to your droid clipboard. Snap! It works pretty well, and I was satisfied with it for about 25 seconds. Then I realized I didn't want to write all that out every time, I just wanted a command, a link and a display. So I put it into a little script in a file titled "makeqrlink".


#!/bin/bash
# You don't need the echo lines, but I like to see what's happening.

echo /tmp/qrencode -o qr-link.jpg ${1}
echo /tmp/display qr-link.jpg

qrencode -o /tmp/qr-link.jpg ${1}
display /tmp/qr-link.jpg

I made the script executable with:


$ chmod +x makeqrlink

Now I can run the command like this:


$ sh makeqrlink http://example.com

And voila, I have my qr code waiting for my droid. If you wanted, you could also make a symlink in your /usr/sbin directory to make this even easier. Something like:


$ sudo ln -s /home/YOURUSERNAME/PATHETO/makeqrlink /usr/sbin/makeqrlink

Now you can just run it from anywhere. I'm sure this could be expanded for other things using qr. I hope you find some of them.

Site Region: