Recently I have been studying QR code recognition and used the zxing open source code, but the GBK type is always garbled. After two days of hard work, I finally solved the problem today. Remember ,.
I was developed on the basis of the Zxing-1.6, because zxing1.6 to the vertical screen to support better.
First, we need to build the environment for compiling core. jar, which I will not talk about. If not, you can refer
Http://yajin167.info/2011/07/01/i
Use a QR code to automatically differentiate between iOS and Android, and even differentiate between iphone and ipad.Transferred from: http://www.cnblogs.com/pengxl/p/3476588.htmlUse a QR code to automatically differentiate between iOS and Android
Android Zxing QR code scanning image stretching,
In this project, the QR code scanning is integrated with zxing, and the image on the scanning interface is obviously stretched and deformed.
Based on past experience, this problem is generally caused by misplacement of x and Y axes. The problem of x and Y axes can be solved.
Because of this problem, many people hav
Android open-source QR code recognition project zxing landscape screen changed to vertical screen recognition solution, androidzxing
I found a lot of methods on the Internet, but there was a problem in the end. After debugging for several hours, I finally solved the problem of portrait screen recognition perfectly.
First, you need to have the simplified code of the zxing project.
Using the simplified versio
Android Zxing QR code flash adding Function
This mainly modifies the CameraManager class under the. zxing. camera package in Zxing.
The switch code is added to CamereManager.
// Provide public void flashHandler () {// camera. startPreview (); Parameters parameters = camera. getParameters (); // determine the current state of the flashlight to modify if (Parameters. FLASH_MODE_OFF.equals (parameters. get
Zxing is a QR code scanning project provided by GoogleThe default sweep area of the demo itself is the largest only 360*480 need to pull a long distance to scan the entire QR codeSo we need to adjust the size of the map ourselves.Make adjustments in the Cameramanager.java classThe default size is the following 4 parameters private static final int min_frame_widt
Zxing is a QR code scanning project provided by GoogleThe demo itself is the default sweep area of the largest only 360*480 need to pull up a very long distance ability to scan the entire QR code toSo we need to adjust the size of the map ourselves.Make adjustments in the Cameramanager.java classThe default size is the following 4 of the parameters private stati
1. Modify the visibility of the local Bluetooth device
2. Scan the available Bluetooth devices around
Eg:
I. configuration file adroidmanifest. xml:
Ii. layout file: Main. xml:
3. mainactivity:
Import android. app. activity; import android. bluetooth. export thadapter; import android. bluetooth. export thdevice;
, have friends if know for Android, request recommended!Two. Scan local music filesFirst through the QQ music has downloaded the good song.Scan implementation://scan local musicif(Environment.getexternalstoragestate (). Equals (environment.media_mounted)) {NewThread () {@Override Public void Run() {Try{string[] ext = {". mp3"}; File File =NewFile (
1. What is Bluetooth )?
1.1 buletooth is the most widely used wireless communication protocol.
1.2 mainly for short-range device communication (10 m)
1.3 is usually used to connect headphones, mouse, and mobile communication devices.
2. Bluetooth-related APIs
2.1 define thadapter:
Represents the local Bluetooth adapter
2.2 define thdevice
Represents a remote Bluetooth device
3. Scan the paired bluetooth device (1)
Note: The simulator cannot be
1. bluetooth pairing, connecting the deviceTurn on system settings, locate Bluetooth, open the sweep gun, and pair the scanner device. Enter a fixed pairing code, usually written in the Manual of the Scanner gun. After pairing is complete, the display device is connected. Just OK.Configure permissions in 2.AndroidManifestAdd Bluetooth permissions to the Androidmanifest.xml file in your Android project. 3. Check the connection status of the scanner
void OnClick (View v) {
//Get Bluetoothadapter object, this API is supported by Android 2.0
Bluetoothadapter adapter = Bluetoothadapter.getdefaultadapter ();
//adapter is not equal to NULL, indicating that this machine has a Bluetooth device
if (adapter! = null) {
System.out.println ("This machine has Bluetooth device!");
//If the Bluetooth device is not turned on
if (!adapter.isenabled ()) {
Intent Intent = new Intent (bluetoothad
) {Logutil.writeerror (ex);LOG.E ("Sendbroadcaseremountsdcard", Ex.getmessage ());Toastutil.show (Activity, "re-mount SD card failed, please restart your phone to view pictures");}}This is useless. To reload, you must scan the file, to re-mount the folder, and to recursively scan all folders under the file.The implementation code is as follows: //Scan Files
Sometimes, we take a picture or record a video, the library app does not recognize these newly generated files by default so open the library or video player found that the files are not found, you need to call Mediascanner scan to come out. A class was found from ffmpeg to scan media files. Public classFfmpegmediascannernotifierImplementsmediascannerconnectionclient {Privatemediascannerconnection mconnecti
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.