QR reader works on phone but not with SDK - android

Created the following photos. https://plus.google.com/photos/110072219024510812700/albums/5746888837287802097?authkey=CJXL587H74LUVA
If I decode by pointing my Samsung Galaxy S onto my laptop's screen it reads it OK. I use Quickmark's app for that. I would like process it programatically so I downloaded Quickmark's SDK and tested it with the demo app, but it could not process it.
Could somebody please help, what might be the problem?

When you scan with an app, you are not scanning this image, but an image of this image. That may well decode, even if this one doesn't, strangely. ZXing doesn't scan this particular image either but it reads easily from screen too.

Related

ML5 image classifiers returns exactly the same results for all images on cordova android platform

I just started working with ML5 and machine learning in general. I started by creating an app that classifies images from my webcam using 'MobileNet' image classifier, I then created a my own classifier using Teachable Machine which also worked great. I created my app using cordova, and I used the browser platform as I got started and all worked great.
However once I switched to try the app on android platform, whatever image I try to classify (whether it is taken with my phone camera, or even hard-coded to the html page) always returns the same result with the exact same confidence. But if I switch back to the browser, it works just fine again. I cant seem to find anyone else reporting this kind of problem. Does anyone have any idea what it might be?
I once had the same problem and it turned out that the Android version was having out-of-memory exceptions that weren't being caught or reported.
After debugging using Chrome Developer Tools (by following this), it appears the problem was that the images I was trying to classify were too large to be processed on android (error - webGL: INVALID_VALUE: texImage2D: width or height out of range).
Therefore reducing the size/quality of the images before classifying them resolved the problem.

Android MediaStore.Images.Media.insertImage works on KitKat only after using camera app to take a picture

I have an app in which the user draws an image using Canvas and Bitmap. When the user wishes to save the image I use MediaStore.Images.Media.insertImage.
On an Android 4.3 or earlier device or AVD it works.
On an Android 4.4 AVD it works.
On an Android 4.4 device it fails with a FileNotFound exception appearing only in DDMS. HOWEVER, if I then go to the Android 4.4 devices camera app and take one picture, then go back to my app and save my image IT WORKS!
Seems like a bug to me. Anyone have any ideas?
Best, Paul
Make sure that there's the folder /sdcard/0/emulated/DICM/Camera. In Android4.4(Kitkat), 3rd party app doesn't create the DCIM/Camera folder. It seems like a bug.
related Google's commit

My code to capture a video from the default camera works fine on every device except the Galaxy S2 when specifying MediaStore.EXTRA_OUTPUT path

I have code that gives me back a path to store my video file which basically produces a path that looks like this:
/storage/sdcard0/Pictures/MyApp/MyApp20130816_144111_1131938614.mp4
When I try to capture the video on my S2, I take the video and press stop the camera my camera app does not display the normal save screen, it just puts itself back into the beginning of capture mode and onActivityResult is never called. I've found that if I do not pass a path to MediaStore.EXTRA_OUTPUT it functions correctly.
I've tested my code on Note II, GS3, GS4, Nexus and they all seem to be able to capture the video and save it to the correct path with no problems. Why would the S2 be behaving this way?
Something about the galaxy s2 doesn't like /storage/ maybe?
Never hardcode paths. Always use methods like Environment.getExternalStoragePublicDirectory() to get the root of where to store files on external storage. Different devices, and even different users on the same device (Android 4.2+ tablets) will have different paths for external storage.
However, the point in my initial comment still holds. You as a developer are not "using the default camera app as installed on the galaxy devices". You as a user may be using that particular app. There are nearly a billion Android device users; you are not all of them. They are welcome to use whatever camera app they want to, including third-party ones. And, they will be using thousands of Android device models. None of them will necessarily honor your request to take a picture. It's certainly worthwhile for you to do testing to try to work more faithfully on more devices (such as not hardcoding paths), but you need to bear in mind that any time you ask another developer's app to do work for you, the other developer is control of what happens, much more than you are.

How to read jpg-image's orientation with Adobe AIR on a mobile device

My problem first seemed to be quite trivial to me first, but yet I didn't find a satisfying solution:
The use-case is:
I load jpgs from 'CameraRoll' or 'CameraUI' to be displayed inside my app.
Although the picture might have been taken in all possible device orientations, I want them always to be rotated correctly to fit my app. Sounds simple.
Problem:
Certain OSes seem to ignore the orientation in the file metadata when opening them in AIR. E.g. Samsung Galaxy Tab running Android 4.2 always displays them in landscape orientation. BlackBerry PlayBook works fine. iOS doesn't give me access to the original file but passes a bitmap-copy, which is "landscape only", too.
Although I might be able to read the exif data on Android, this will AFAIK not work on iOS.
Adding manual "rotate" buttons to my UI might be a solution, too, but I would prefer not to.
Have you tried An exif Extractor Libary for Actionscript 3.0?

How to run zxing apps on avd

I m new to android
i have installed BarcodeScanner3.72.apk on MY AVD for testing if it works or not
My AVD Camera is working properly i can get image with it.
But whenever i start Barcode Scanner app it shows black and white background
I am not getting whats the problem.
One more thing i have also install same app on My Samsung Galaxy but it can't read barcode.
is there anything that i should keep in mind to use barcode app on samsung Galaxy!!
Sorry for my english !!!!!
Thanks
There is no camera preview available in the AVD, so the black and white pattern you see is normal, and just the AVD's fake video stream.
Tom Gibara has posted the famous and canonical way to slip a live video feed into code that's running on the AVD. YOu would need to modify the Barcode Scanner source for this to work.
Barcode Scanner works well on the Samsung Galaxy, I'm not sure what issue you're having.

Categories

Resources