So, I had been looking for an easy way to scan a barcode and then share it as a QR Code (even if the original was in a different format). After a while going through several different applications with no luck, I finally realized what I could do.
The ZXing barcode scanner has a "custom search" feature that allows entering a custom URL for searching. I didn't think that I had any use for it, until I realized that I could use it to easily convert data read from a barcode into QR Code format.
Basically, all I did was utilize the same thing that's used by ZXing's online QR Code generator.
Here's how:
- Open the Barcode Scanner application.
- Tap the phone's Menu Key.
- Tap the "Settings" option.
- Tap the "Custom search URL" item (you might need to scroll down first).
- Fill in the box with: "http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=%s" (not including the quotes).
- Go back and scan something.
- Press the "Custom Search" option.
- See below.
Notes:
- The "300x300" part is the size; I found this to be a good size on my Droid Incredible, but you can change it as needed. (It should remain a square, though.)
- It doesn't like the "%" (percent) symbol. I haven't found an easy way around this, but I'm sure it could be put into the generator box directly using JavaScript; I just haven't taken the time to figure it out. (Let me know if you do, so I can link to it!)
- If you scan something that contains a percent symbol, and it's not working properly, replace the "%" in the URL it directs you to with "%25"; then it should work.
2 comments:
Post a Comment