ZXing Android source for Blackberry
To my knowledge, in the ZXing Android source code, there is a custom layout to display key points in the QR code image (ViewfinderView
). It then displays analysis of the byte stream of the image.
Can I detach from this design and use the Android ZXing source code to develop an approach which can be used in both th开发者_如何学运维e Android and BlackBerry platforms?
It will be a JAR file which can be used to decode QR codes, using the Android ZXing source.
Can this be done? Have anyone tried this approach?
FYI - The BlackBerry OS6 SDK comes with the Zxing code built in.
All of the core decoding code (in core/) is Java 1.2-compatible, and compatible with the J2ME subset of Java (MIDP 2, CLDC 1.1). So, yes, it works fine on Blackberry. However the Android-specific code you are referencing is never going to be of any use on a RIM device; completely different APIs. But, go find the rim/ folder which has a RIM-specific client for you.
Keep in mind that BlackBerry is built on top of Java ME, meaning it uses Java language features from version 1.3. This means no generics, no 'assert' keyword, no enums.
If the Zxing developers decided to maintain 1.3 compatibility, there's a good chance you can make use of it on BlackBerry. But since Android supports Java 6 features, it's doubtful the developers would make Java 1.3 compatibility a goal.
Edit
It looks like there is a j2me folder, so maybe you're in luck.
Either way, you will need to build it once on android and then just replace the android library with BlackBerry libraries to try and get it working. If you choose to build it on android first feel free to read through this post.
精彩评论