I am building an app that allows operators to scan barcodes and take pictures using their android phones. The operator is led through by turning various controls off and on at strategic points in the process by altering their visible properties. Both the barcode scanner and camera are invisible to start and then are made visible by button taps. After the code is scanned or a photo is taken the control is turned off.
The process works fine through the first iteration. Barcodes are scanned, a photo is taken, and the image control set to the output of camera.photo. Prior to starting a new loop through the entry sequence, all the data from the various controls are added to a collection and then the controls are cleared. Where it breaks down is on the second pass through. Barcodes are scanned, and when the camera control becomes visible, the item with the barcode is in the viewfinder, and the viewfinder isn't "live". While the item needed for the photo is the item with the barcode, it's not correctly positioned for the photo.
I need to find a way to "reset" the camera at the beginning of each pass so that I get a live viewfinder every time.
Any help would be appreciated.