Currently I have a small Activity that allows me to read QR codes and returns the string that contains the code.
I do this with CameraSource and SurfaceView from the package com.google.android.gms.vision y com.view respectively.
But I wonder if there is some way through code to know if the device that runs the application has the ability to read QR codes.
Because if the device cannot read QR codes, I would like to display a TextView instead of the SurfaceView saying that the device can't do this.
Thank you, so much.
Check if the device has a camera. There's nothing special about reading QR codes; the device takes a picture, the image analysis logic does the rest.
Related
I am using ZXing barcode scanner, but some devices are unable to quickly read QR codes. A fix I am seeing is to take a picture of the code, and read the scan the code from the image.
I tried putting SurfaceView and ZXingScannerView on top of each other, and setting the surface view visibility to invisible. But they conflict with each other.
Any idea on how to do this?
Thanks!
I'm doing black box automation testing (with appium & ruby) for app which use camera in few cases:
- taking photo
- scan QR code
- scan PDF code
I'm looking for a way to set image in to image preview to scan it.
This should(ideally) word for both emulators and real devices.
I was willing to do the same for my app (which scann QR code), and the solution I used was to add an EditText (which appears only in test mode) to put the string, which corresponds to the QR code, and then handling the string as the result of the scan.
The problem with that solution is that you can't test the camera or the functions/methods you made to decode, but it's the only problem so if you are using a library (like ZXing) it's not a big deal, because I assume you want only the string that corresponds with the QR code.
Hello im trying to make my own special custom code scanner. My app's render a special custom barcode and I need to make a very simple scanner that will take whats currently being seen with the camera and quickly process it to decode the barcode. So how can I grab the frames from the camera and use them as images without pressing the "take" button.
check the open source project. It give bar-code without click take photo button.
Link
Thanks
I want to use QR code to get the smart phone's location (either UTM or Lat/Lon). Reading this article, it looks like it is possible to get the position of the smart phone. In addition, I want to render some 3D models on the camera screen. Is it possible? Actually I have no clue from where should I start.
Can anyone help me out regarding this?
Thanks.
If you read that article carefully, all it suggests to get the location of the phone, is to simply encode the lat/lon in the QR code itself. This will only work if the location of the displayed QR codes are fixed (e.g. a sticker on a wall rather than printed on a flyer).
Is it possible to render 3D models on a camera screen? Sure. It wouldn't be the default camera app, you'd have to make your own. It would involve a fair bit of math if you wanted to position the 3D model relative to the QR code. You'd probably try to build planes based on the sides of the squares.
i have a question regarding Zxing. I have immplemented succesfully the barcode scanner and its working better than expected.
My question is:
It is possible to scan a barcode from an image WITHIN the device (Internal or SD)?
If so, how can i achieve this?
Thanks!
Barcode Scanner does not do this, no. However Barcode Scanner+ does; it's one of the extra features I put into it.
https://play.google.com/store/apps/details?id=com.srowen.bs.android