Android - Barcode Scanning with a low res camera (3.2mp)
FREE solution:
I've had success with a fraction of a drop of water or oil over the lens of the camera on my ZTE Score. It causes bar codes close to the camera to be in focus, and they read reliably. Enough to form a convex surface, but not so much that it drops off.
The ZTE Score has a smooth back; I dip my finger in oil and, with the lens aimed up, touch the back of the phone where the lens to put a droplet of oil on it. Then I can turn the phone face up (lens down) and I can scan bar codes. If the outer surface of your camera lens isn't flat, this likely won't work, but it's worked with my ZTE score and should work with most low-end (fixed focus) phones.
A clear convex on one side, flat and sticky on the other side piece of plastic would do the trick too; I recall seeing stick-on rubber feet that would have served well, but haven't seen 'em and haven't tried that.
I got tired of doing this every time I wanted to scan a barcode, and just ordered a macro lens.
If the codes don't fit on the screen when in focus, your drop is too big; use less.
(I'll address your 2nd edit below...)
Some cheap camera modules don't include an auto focus feature, i.e. they are fix-focus'ed to infinity.
Barcode scanners need a near focus though and cannot (or hardly) scan the resulting blurry images that result from infinity-focused fix-focus cameras.
The only way around this would be to attach a macro lens specifically designed for smartphone cameras (also works with fix focus). Search for smartphone macro lens to see some samples.
I already tried that once with an older (also fix-focus) Sony-Ericsson Xperia X8 and it worked back then.