Android QR code ZXING3.0 (released in 201403) Access

Source: Internet
Author: User

Https://github.com/zxing/zxing/tree/zxing-3.0.0.

Rack pack http://repo1.maven.org/maven2/com/google/zxing/core/3.0.0/

Official Note: https://github.com/zxing/zxing/wiki/Getting-Started-Developing (all English, this article also referred)

The size of the package is 128 MB. There are a lot of things in it. This article helps you to scan and create QR codes with minimal code and size.

1. officially recommended access methods
The source code is called in Intent mode without modifying the source code.
The call is simple and does not damage the interior, so it is not easy to make errors.
To install an APK at the same time, this is obviously not the way we want it.


2. Modify the DEMO source code without modifying the core package. This method is used in this article.
Remove unused function code, Customize interface call methods, and result processing methods.
Modification and calling are relatively simple, without damaging the core package, and the parsing generation is stable.


Core package has the following major functions:

1. core package.
2. vibration, sound management, camera control, and subthread interaction management.
3. manage different power modes.
4. user preference record and setting, scan history record management, and share via SMS.
5. user help, Google search, and Google store.
6. Multi-result processing, including phone calls, text messages, URLs, and Wi-Fi settings


The above is a little background knowledge:

The whole process of QR code parsing

Process


As mentioned above, do not modify the core package. In order to quickly complete the development work, we try to avoid getting in touch with the code of the core package.
The core is data parsing, data acquisition, and UI update. Inter-thread communication relies on Handler.
The focal length adjustment is just a module that is independent of the camera image, but there is a sequence. The camera keeps taking pictures, and the focal length starts to complete. Multiple images may have been decoded multiple times.
Initialize camera-related parameters and set them according to preference. For example, whether to enable the flashlight. Set only once.


ZXING3.0 Project Background

The downloaded compressed file contains the android folder. After importing eclipse, the project name is CaptureActivity. The project is a maven Project, which is a headache.

In the next article, I will introduce the procedure in detail.





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.