QR code generation with zxing

Dev with skrymer

This post will show you how to easily create QR codes using the zxing library using groovy and how to programmatically add a image overlay on top of a QRCode.

First download the zxing library from there github.

Now that we have the library let’s start with something easy like creating a QRCode that represents the url for this post:

  1. Create a new QRCodeWriter and invoke it’s encode method with the data to be stored in the QRCode, the Barcode type we want generated (zxing supports more formats than QRCode) and last we put in the width and height of the QRCode.
  2. Create the image using MatrixToImageWriter.toBufferedImage() from the previously generated matrix.
  3. Last create the actual image and save it on disk

If we execute the code (without errors) the following QRCode will be generated:

The zxing library makes it really easy other types of barcodes and the library contains…

View original post 307 more words


Farry .H行銷人



「永遠去打弱的地方,寧願做小地方的龍頭」–shared by Joel


Q: ShopBack怎麼進行人才管理的?

View original post 50 more words

Testing Local Web Sites with the Android Emulator

Matt or Meeple

The other day I was trying to fix an issue that was reported by a user of an older Android device. I am not an Android user, and do not have an actual Android device to test with. So, I thought I’d try using the Android Emulator to reproduce the issue and verify my fix.

These instructions assume you are using  Mac OS X, but should be easy to follow with minimal changes if you are on another platform.

Install Android Studio

If you are only interested in using the Android emulator, you could skip the full Android Studio installation and just install the Android SDK Tools. But, the Android Virtual Device (AVD) Manager that comes with Android Studio looks a bit more polished than the core SDK version, so I’d recommend installing the full Android Studio.

Android Studio Download Page

Create a Dummy Project in Android Studio

I couldn’t find a way…

View original post 359 more words