How can you integrate the front-facing camera of iPhone 4/iPod Touch with ZXing?

104 views
Skip to first unread message

Kofi

unread,
Apr 7, 2011, 12:26:50 AM4/7/11
to zxing
I want to use the front-facing camera of an iPhone 4/iPod Touch
instead of the rear-view camera to scan bar codes using the ZXing app.
I was wondering if someone can help or show me how to integrate the
front-facing camera and ZXing iPhone app?

I added these lines of code to the RootViewController.mm file:

widController.SourceType = UIImagePickerControllerSourceTypeCamera; //
Camera
widController.cameraDevice =
UIImagePickerControllerCameraDeviceFront; //Activate front-facing
camera for iDevice

But it was giving me errors, so I wasn't sure if I have to make other
changes to another external file.

I was wondering if someone can show me the changes I have to make in
order to activate the front-facing camera for ZXing?

Romain

unread,
Apr 8, 2011, 3:05:36 AM4/8/11
to zxing
I you are using ZXingWidget, it does not user UIImagePickerController
anymore. You you take a llok at how to make a AVCaptureInput to use
the front facing camera
Reply all
Reply to author
Forward
0 new messages