Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9149317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:27:38+00:00 2026-06-17T11:27:38+00:00

I am using RedLaser and MonoTouch to develop a simple barcode scanning App. I

  • 0

I am using RedLaser and MonoTouch to develop a simple barcode scanning App.
I have used the Sample code provided and I am able to deploy my code to the iphone and it scans Barcodes fine.

However, the camera view is not showing. The Active region is blank. Please see the image below
enter image description here

When I run the sample it works fine. I am guessing it is something to do with wiring the Views and the Controllers

my Code is like this:

public partial class BarcodeScanModalController : CameraOverlayViewController
{
CAShapeLayer Rectanglelayer;
bool IsSilent;

public BarcodeScanModalController (IntPtr handle) : base (handle) 
{
}

public BarcodeScanModalController ()
{
}

internal void BeepOrVibrate ()
{
if (!IsSilent)
{
SystemSound.FromFile ("Sounds/beep.wav").PlayAlertSound ();
}
}

void setPortraitLayout ()
{
// Set portrait
ParentPicker.Orientation = UIImageOrientation.Up;
// Set the active scanning region for portrait mode
ParentPicker.ActiveRegion = new RectangleF (0, 100, 320, 250);
// Activate the new settings
ParentPicker.ResumeScanning ();
// Animate the UI changes
CGAffineTransform transform = CGAffineTransform.MakeRotation (0);
//this.View.Transform = transform;
UIView.BeginAnimations ("rotateToPortrait");
//UIView.SetAnimationDelegate = this;
UIView.SetAnimationCurve (UIViewAnimationCurve.Linear);
UIView.SetAnimationDuration (0.5f);

setActiveRegionRect ();
UIView.CommitAnimations (); // Animate!
}

CGPath newPathInRect (RectangleF rect)
{
CGPath path = new CGPath ();
path.AddRect (rect);
return path;
}
void setActiveRegionRect ()
{
Rectanglelayer.Frame = new RectangleF (    ParentPicker.ActiveRegion.X,
                                  ParentPicker.ActiveRegion.Y,
                                  ParentPicker.ActiveRegion.Width,
                                  ParentPicker.ActiveRegion.Height
);

CGPath path = newPathInRect (Rectanglelayer.Bounds);
Rectanglelayer.Path = path;
Rectanglelayer.SetNeedsLayout ();
}

Then I use this OverlayController like this:

public void ScanItemsButtonPressed (object sender, EventArgs e)
{
  if (overlayController == null)
{
overlayController = new BarcodeScanModalController {  ModalTransitionStyle = UIModalTransitionStyle.FlipHorizontal};
}

if (overlayController.ParentPicker == null)
{
BarcodePickerController picker = new BarcodePickerController ();
picker.Overlay = overlayController;
picker.Delegate = new BarcodePickerDelegate (this);
picker.Orientation = UIImageOrientation.Up;
}
overlayController.ParentPicker.ScanUPCE = true;
overlayController.ParentPicker.ScanEAN8 = true;
overlayController.ParentPicker.ScanEAN13 = true;
// overlayController.ParentPicker.ScanSTICKY = false;
overlayController.ParentPicker.ScanQRCODE = false;
overlayController.ParentPicker.ScanCODE128 = true;
overlayController.ParentPicker.ScanCODE39 = true;
overlayController.ParentPicker.ScanITF = true;
// Data matrix decoding does not work very well so it is disabled for now
overlayController.ParentPicker.ScanDATAMATRIX = false;
// hide the status bar
UIApplication.SharedApplication.StatusBarHidden = true;

overlayController.Done += delegate {
DismissModalViewControllerAnimated (true);
} ;

this.PresentModalViewController (overlayController.ParentPicker, true);
}

I am using MonoTouch 6.0.8, RedLaser 3.4.0, and XCode 4.5.2
Any help would be highly appreciated. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:27:39+00:00Added an answer on June 17, 2026 at 11:27 am

    This appeared to be rather a simple issue.

    The background Color and the ActiveRegion FillColor was a Full Color (not transparent), so it comes on top of the Camera View. I was able to resolve the issue by Setting the background of the Scanning View to No Color (Default), and setting the ActiveRegion to something transparent as below.

    RectangleLayer.FillColor = UIColor.FromRGBA(1.0f, 0.0f, 0.0f, 0.2f).CGColor;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the RedLaser binding for Monotouch to create an app that scans
I am using redlaser sdk for scanning the barcode of products. I want to
Using ember 1.0.0-pre3 I have a little app that has this code: window.App =
I am using redlaser api in my app. I am getting Resource not found
Using Play 2.1-RC1 I can't write simple test. Here's the action code: def echoTestTagFromXml
I'm currently in the final stages of of completing a barcode scanning app which
Using the Redis info command, I am able to get all the stats of
Using RestKit 0.10.1, I have objects served similar to this json format: {objects: [
Using the example provided in jQueryUI tutorial: jQuery UI Draggable + Sortable When I
Using Trigger.io's barcode api in an application that only contains boilerplate HTML and the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.