I need to ask a questrion related to barcode scanning, I am using an app that scans barcodes and searches the web fr the results. Now this is my method where i create instance of my camera object
/** A safe way to get an instance of the Camera object. */
public static Camera getCameraInstance() {
Camera c = null;
try {
c = Camera.open();
} catch (Exception e) {
}
return c;
}
For scanning i am using a Zbar library. My question is regarding the device Asus Nexus 7. I dont have that device with me currently, but i know that it just has the front camera and no Back camera in it. How to make it work in case of devices with just the front camera and no back camera? Will it work fine with my code ? if i add the the following uses-feature android:name = "android.hardware.camera.front" android:required="false"
My sole purpose is to allow the user to scan the barcode, if there are both the front and back camrera it should scan via Back camera and if it has only the front camera it should scan via that camera only, How am i to proceed in it? All suggestions will be welcomed. :-D