perfect solution to solve Android using zxing scan QR code changed to vertical screen, after the preview screen appeared stretched, distorted situation
First step: Findcom.zxing.cameraUnder the bagCameraConfigurationManager.javaIn the filevoid initFromCameraParameters(Camera camera)MethodStep two: InLog.d(TAG, "Screen resolution: " + screenResolution);Then add the following codenew Point();screenResolut
Android Read and NetEase music function source650) this.width=650; "src=" Http://www.apkbus.com/data/attachment/forum/201710/24/110530crnxz23qlnsyh6x0.gif "alt= "Android Read and NetEase music function source code"/>Android with waterfall flow show beautiful pictures source650) this.width=650; "src=" Http://www.apkbus.com/data/attachment/forum/201710/24/105601kar
(Resultpointcolor); for (Resultpoint Point:curr Entlast) {canvas.drawcircle (Frame.left + point.getx (), Frame.top + point.gety (), 3.0f, Paint);}} Request another update at the animation interval, and only//repaint the laser line,//not the entire viewfinder mask . Å è¡#̈亞 id ã version 壂 æ 忔 fermium 勫 search锛 yue decyl 紝 å duo Yeast Rice 鍦 Edition 闀挎柟褰 Juan Indent ID Ã? Postinvalidatedelayed (Animation_delay, Frame.left, Frame.top, Frame.right, Frame.bottom); }} public void Drawviewfinder ()
After Android uses Zxing to scan the QR code and change it to a portrait screen, the preview screen is stretched and distorted.
Perfect solution: After Android uses Zxing to scan the QR code and changes it to a portrait screen, the preview screen is stretched and distorted.
Step 1: Find
com.zxing.cameraPackage
Camer
to obtain the image, using Zbar to parse the scanned data, eventually forming the current project.Third, the development processFirst Peel zxing Camera control Code, get the original scanned data, zxing Viewfindview personal feeling is not very good, simply I took it off,Directly through the XML file layout, multi-screen adaptation instantly solved. And for the scanning laser line animation effect, the control of the screen is only a slight transformation of the code can be achieved. How to sol
Find the relevant technology on the Internet to determine whether the mobile browser is ISO or Android to download the specified app via JSCreate a new JSP page code as follows: JSP page as the generation of two-dimensional code address, when scanning the QR code to open the page will automatically execute the following code, identify the app Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. QR
Program source code and executable file: Http://files.cnblogs.com/rainboy2010/zxingdemo.zipZxing, an extremely powerful bar code parsing class Library, the following explains how to use the Zxing class library to implement sweep sweep function, first put on a:The main code is as follows:1. Get the preview image in the Onpreviewframe method and pass it to Decodehandler to parsepublic void Onpreviewframe (byte[] data, camera camera) {point cameraresolution = Configmanager.getcameraresolution
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;
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
Recent work needs to develop a QR code scanning software (based on open source project zxing), the problems encountered in the record, but also hope to bring you help.1. First because the scan to open the camera so add permission is certain, otherwise nothing can be done behind2. Set the size of the scan box:Find in the Com.zxing.camera packageprivate static final int min_frame_width = 240;private static fi
formal, but to achieve my purpose is true.First in the zxing root directory execution mvn compile, the guy, kept download the dependency package, said this first time the compilation needs to download a large number of packages, if I did not do proxy or library changes, then need a long wait.I ran for almost one hours at night and thought I'd come back and compile. But I was disappointed, although the package is finished, but the compilation has a problem. Execute again, this compile no error,
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.