I have created a barcode scanner; That works fine. I am using Xamarin Forms and working with Android. I had recently received some barcode samples in photo format, however the photo's are not being recognized when I print them out and scan them.
Next, I would like to try to import the photos and use those as my background, to then see if it would recognize the barcode.
I am using ZXing.Net.Mobile and .Forms extension. Is there any file, or code I can implement to point to a filepath and then load that image as my background?
Thanks for any answers or suggestions.
If photos are not recognized than it must be something wrong with your code. I don't see a point to test this this way. In your application it wont work anyways. ZXing.Net.Mobile uses camera to intercept frames and decode them in real time to match qr code pattern.
Related
I have an app that lets users create a dynamic link (using firebase) to their information and that redirects to the play store first if they don't have the app installed yet. When the dynamic link gets created, it gets encoded in a QR code for easy sharing. Unfortunately some (not all) Android devices are cutting off a portion of the link so that it doesn't work.
So here is the QR code that gets generated:
After scanning it, some android devices show this on the screen:
If you select "copy", you get this text: "https://missionary.page.link?apn=com.quintessence.missionary&ibi=com.quintessence.missionary&link=https://missionary.page.link/missionaryDetails?missionaryID%3DnRLkLgbVQ94Af2uI2rQO"
This is the text that is supposed to be there, and if you then paste it in the browser, it works correctly and either opens the app or the google play store. If you select "Open in browser" instead, it cuts off a portion of the text and returns this:
Selecting the URL and copying it, shows that the last section of the text is getting cut off and it's trying to open this instead: "https://missionary.page.link/?apn=com.quintessence.missionary&ibi=com.quintessence.missionary&link=https".
Any help with understanding why this is happening and what I can do to prevent it would be great!
I have tried googling a solution but didn't find anything about text in QR codes getting cut off.
My requirement is to print a byte array using a wifi printer in Xamarin Forms. I have placed an image and a QR code to a screen and took a screenshot of it programmatically so that I have converted it to byte[]. Now I have to print it. I know that there is no direct way to do this and should implement dependency service for this. I have already tried this and this but didn't work. Can anyone please provide a working example for this?
Xamarin.tesseract is not working in case of android. After taking the pic it takes too much time to give the result and also result is not coming properly. It is giving wrong data instead of correct text on the image. Can someone gives the working code for this or is there any other open source library for reading ocr in android and ios both in Xamarin forms.
I've got a suite of KIF tests for our app, but one part that I can't work out how to cover is where we use UIImagePickerControllers. Obviously I can't check the camera, but I'd like to write a scenario where the user chooses an image from their library. I know that there's +[KIFTestStep stepsToChoosePhotoInAlbum:atRow:column:], but what I don't know is how to set it up it so that there's a consistent set of images for the test to choose from. How do I seed the simulator's photo albums?
There are 2 different ways (one involves programming) to populate the Photo Library of the iOS Simulator:
Open Safari in the iOS Simulator, search for some large sizes images in Google, open one and display it in full size. Then do a long press on the photo and choose save. Repeat this with several photos to fill up the library.
Create a folder on your Mac with the images you want to populate the Photo-Library with. Then write a small iOS application, that iterates over that directory and creates NSData objects from each photo file. Save the NSData object to the Photo-Library using the
(void)writeImageDataToSavedPhotosAlbum:(NSData *)imageData metadata:(NSDictionary *)metadata completionBlock:(ALAssetsLibraryWriteImageCompletionBlock)completionBlock
method of AssetsLibrary.
Here's a project that's working for me:
https://github.com/justin/PopulateSimulatorPhotos
It has proven very good in those cases that you need to reset the simulator again and again or want to test quickly on all the device types.
I'm trying to decode qr-codes in a PDF (generate by Scan2Mail with a Canon iR Scanner).
I know the quality is quite poor (see attached image), but with every single iOS app for qr-code scanning I can successfully scan the code within milliseconds filming the image below with the iPhone cam.
I tried to scan with zbarimg and zxing but nothing did work. Do you have ideas what to do? maybe enhance the image somehow with imagemagick?
It seems counter-intuitive that an image of an image decodes, when the original image doesn't. An app is seeing a stream of slightly different versions of the image. The original is damaged and distorted. The blur that results when the camera captures it can actually help remove the noise. Yes, zxing decodes this fine -- from the Barcode Scanner app.
Try running this through a light blur filter first.