QRGen 二维码扫描生成

https://github.com/kenglxn/QRGen

QRGen: a simple QRCode generation api for java built on top ZXING

Dependencies:

ZXING: http://code.google.com/p/zxing/

Get it:

QRGen consists of three modules: core, javase and android.

As of 2.1.0 QRGen is available from jitpack.io. QRGen is no longer deployed to maven central (ref: #61). Older releases are available from Maven Central Repository.

Maven:

Gradle:

Nexus proxy setup for jitpack

See https://github.com/jitpack/jitpack.io/issues/506 for solution.

(thanks to @LTheobald for the heads up)

Java Application

When developing a Java application you need to add javase module to your list of dependencies. The required coremodule will be added automatically by your build system:

Gradle:

Maven:

Android

When you want to use QRGen inside your android application you need to add the android module to your list of dependencies. The required core module will be added automatically by your build system:

Gradle:

Maven:

Or you can clone and build yourself:

Usage:

Java SE only

When using java you can create svg files via .svg() terminal operator:

It's also possible to write svg to an OutputStream with terminal operation:

Android only

On Android you have a special method bitmap() which returns a android.graphics.Bitmap without creating a Fileobject before, so you can use the generated android.graphics.Bitmap immediately inside an ImageView:

License:

http://www.apache.org/licenses/LICENSE-2.0.html

你可能感兴趣的:(QRGen 二维码扫描生成)