Ejemplo n.º 1
0
        protected override MobileBarcodeScanner GetInstance()
        {
            var scanner = new MobileBarcodeScanner(this.getTopActivity());

            if (BarCodes.CustomOverlayFactory != null)
            {
                var overlay = BarCodes.CustomOverlayFactory();
                if (overlay != null)
                {
                    scanner.UseCustomOverlay = true;
                    scanner.CustomOverlay    = overlay;
                }
            }
            return(scanner);
        }
Ejemplo n.º 2
0
        protected override MobileBarcodeScanner GetInstance()
        {
            var scanner = new MobileBarcodeScanner(Deployment.Current.Dispatcher);

            if (BarCodes.CustomOverlayFactory != null)
            {
                var overlay = BarCodes.CustomOverlayFactory();
                if (overlay != null)
                {
                    scanner.UseCustomOverlay = true;
                    scanner.CustomOverlay    = overlay;
                }
            }
            return(scanner);
        }
Ejemplo n.º 3
0
        //public void CheckScannerAvailability() {
        //    var frontCamera = UIImagePickerController.IsCameraDeviceAvailable(UIImagePickerControllerCameraDevice.Front);
        //    var rearCamera = UIImagePickerController.IsCameraDeviceAvailable(UIImagePickerControllerCameraDevice.Rear);
        //    if (!frontCamera && !rearCamera)
        //        throw;

        //    return await AVCaptureDevice.RequestAccessForMediaTypeAsync(AVMediaType.Video);
        //}


        protected override MobileBarcodeScanner GetInstance()
        {
            var controller = this.GetTopViewController();
            var scanner    = new MobileBarcodeScanner(controller);

            if (BarCodes.CustomOverlayFactory != null)
            {
                var overlay = BarCodes.CustomOverlayFactory();
                if (overlay != null)
                {
                    scanner.UseCustomOverlay = true;
                    scanner.CustomOverlay    = overlay;
                }
            }
            return(scanner);
        }