public ZxingSurfaceView(ZxingActivity activity, ZxingScanningOptions options) : base(activity) { this.activity = activity; screenResolution = new Size(this.activity.WindowManager.DefaultDisplay.Width, this.activity.WindowManager.DefaultDisplay.Height); this.options = options; this.reader = new MultiFormatReader { Hints = new Hashtable { //Formats to use { DecodeHintType.POSSIBLE_FORMATS, this.options.GetFormats() } } }; this.surface_holder = Holder; this.surface_holder.AddCallback(this); this.surface_holder.SetType(SurfaceType.PushBuffers); this.tokenSource = new System.Threading.CancellationTokenSource(); }
public ZxingSurfaceView (ZxingActivity activity, ZxingScanningOptions options) : base (activity) { this.activity = activity; screenResolution = new Size(this.activity.WindowManager.DefaultDisplay.Width, this.activity.WindowManager.DefaultDisplay.Height); this.options = options; this.reader = new MultiFormatReader { Hints = new Hashtable { //Formats to use { DecodeHintType.POSSIBLE_FORMATS, this.options.GetFormats() } } }; 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); }
public override void AutoFocus() { ZxingActivity.RequestAutoFocus(); }
public override void StopScanning() { ZxingActivity.RequestCancel(); }