-
Notifications
You must be signed in to change notification settings - Fork 700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Front Camera on Android #3
Comments
Good idea, I'll look at adding this into the api! |
I will take a look. |
I'm doing this already in another app (so I can use my Nexus 7).. Just a matter of bringing over that code... |
Hello, I'm testing the library with my Nexus 7 and all I see is the overlay without the camera feed. the same result is seen with both the sample app and my own app. I'm running Android 4.2.2. |
@jstawski the code already exists for this, but it's in an #if _ANDROID_9 block, which means this feature is only available if you target API level 9 or higher (that's Gingerbread, android 2.3). By default the Sample app is set to target 2.2 Froyo (API Level 8) so the code is never executed for multiple cameras (or front cameras). Try going into your sample project properties and in the 'General' section, setting the Target Framework to Android 2.3 (Gingerbread). It should then use the Nexus 7 camera. I have a Nexus 7 here and it is working fine :) |
I will do that with the sample project and give it a shot, but my application targets 4.0+ and it is not working. |
The trick is, Target Android version and Target Build Framework are not the same thing... the sample project by default targets 4.0.3, but the target build version was 2.2. So there's really 3 places in the project config related to the android version:
|
In the next release the sample code will be targeting the 2.3 framework by default so this confusing is minimized :) |
While I realise that it would be a bit awkward to use, it would be nice if a device that only has a front camera (e.g Nexus 7) could still scan barcodes.
Perhaps an option could be added to choose which camera to use if more than one is available.
The text was updated successfully, but these errors were encountered: