@resonance_siv Samsung galaxy y doesn't have auto focus on its camera, it has a fixed focused camera. To scan the bar code, you need to buy a good quality phone. But if you can't buy a new phone and still want to use it for application development, you need to print out some big sized barcodes. You can use the barcode number of your desired products and generating barcodes out of those numbers using the site:
http://www.barcoding.com/upc/
After generating barcode, copy-paste them in a word file and print in big sizes (They don't have to be oversized but a fairly big code like 5 inches wide will do). Your samsung galaxy y will be able to scan the codes.