public override void ScanContinuously(MobileBarcodeScanningOptions options, Action <Result> scanHandler) { var scanIntent = new Intent(lifecycleListener.Context, typeof(ZxingActivity)); scanIntent.AddFlags(ActivityFlags.NewTask); ZxingActivity.UseCustomOverlayView = this.UseCustomOverlay; ZxingActivity.CustomOverlayView = this.CustomOverlay; ZxingActivity.ScanningOptions = options; ZxingActivity.ScanContinuously = true; ZxingActivity.TopText = TopText; ZxingActivity.BottomText = BottomText; ZxingActivity.OnCanceled += () => { ZxingActivity.RequestCancel(); }; ZxingActivity.OnScanCompleted += (Result result) => { if (scanHandler != null) { scanHandler(result); } }; lifecycleListener.Context.StartActivity(scanIntent); }
//BarcodeReader reader; public ZxingSurfaceView(ZxingActivity activity) : base(activity) { this.activity = activity; screenResolution = new Size(this.activity.WindowManager.DefaultDisplay.Width, this.activity.WindowManager.DefaultDisplay.Height); this.surface_holder = Holder; this.surface_holder.AddCallback(this); this.surface_holder.SetType(SurfaceType.PushBuffers); this.tokenSource = new System.Threading.CancellationTokenSource(); }
//int width, height; //MultiFormatReader reader; //BarcodeReader reader; public ZxingSurfaceView(ZxingActivity activity, MobileBarcodeScanningOptions options) : base(activity) { this.activity = activity; screenResolution = new Size(this.activity.WindowManager.DefaultDisplay.Width, this.activity.WindowManager.DefaultDisplay.Height); this.options = options; lastPreviewAnalysis = DateTime.Now.AddMilliseconds(options.InitialDelayBeforeAnalyzingFrames); //this.reader = this.options.BuildMultiFormatReader(); this.surface_holder = Holder; this.surface_holder.AddCallback(this); this.surface_holder.SetType(SurfaceType.PushBuffers); this.tokenSource = new System.Threading.CancellationTokenSource(); }
//BarcodeReader reader; public ZxingSurfaceView(ZxingActivity activity, MobileBarcodeScanningOptions options) : base(activity) { this.activity = activity; screenResolution = new Size(this.activity.WindowManager.DefaultDisplay.Width, this.activity.WindowManager.DefaultDisplay.Height); this.options = options; this.reader = this.options.BuildMultiFormatReader(); this.surface_holder = Holder; this.surface_holder.AddCallback(this); this.surface_holder.SetType(SurfaceType.PushBuffers); this.tokenSource = new System.Threading.CancellationTokenSource(); }
internal void PlatformAutoFocus() => ZxingActivity.RequestAutoFocus();
internal void PlatformCancel() => ZxingActivity.RequestCancel();
internal void PlatformResumeAnalysis() => ZxingActivity.RequestResumeAnalysis();
internal void PlatformPauseAnalysis() => ZxingActivity.RequestPauseAnalysis();
internal void PlatformTorch(bool on) { torch = on; ZxingActivity.RequestTorch(on); }
//int width, height; //MultiFormatReader reader; //BarcodeReader reader; public ZxingSurfaceView (ZxingActivity activity, MobileBarcodeScanningOptions options) : base (activity) { this.activity = activity; screenResolution = new Size(this.activity.WindowManager.DefaultDisplay.Width, this.activity.WindowManager.DefaultDisplay.Height); this.options = options; lastPreviewAnalysis = DateTime.Now.AddMilliseconds(options.InitialDelayBeforeAnalyzingFrames); //this.reader = this.options.BuildMultiFormatReader(); this.surface_holder = Holder; this.surface_holder.AddCallback (this); this.surface_holder.SetType (SurfaceType.PushBuffers); this.tokenSource = new System.Threading.CancellationTokenSource(); }
public override void AutoFocus() { ZxingActivity.RequestAutoFocus(); }
public override void Cancel() { ZxingActivity.RequestCancel(); }
public override void ResumeAnalysis() { ZxingActivity.RequestResumeAnalysis(); }
public override void PauseAnalysis() { ZxingActivity.RequestPauseAnalysis(); }
//BarcodeReader reader; public ZxingSurfaceView (ZxingActivity activity, MobileBarcodeScanningOptions options) : base (activity) { this.activity = activity; screenResolution = new Size(this.activity.WindowManager.DefaultDisplay.Width, this.activity.WindowManager.DefaultDisplay.Height); this.options = options; this.reader = this.options.BuildMultiFormatReader(); this.surface_holder = Holder; this.surface_holder.AddCallback (this); this.surface_holder.SetType (SurfaceType.PushBuffers); this.tokenSource = new System.Threading.CancellationTokenSource(); }
public override void Torch(bool on) { torch = on; ZxingActivity.RequestTorch(on); }