Any nice documentation on using the Red Laser SDK...?

Discussion in 'iOS Programming' started by Ubuntu, Jul 30, 2012.

  1. Ubuntu macrumors 68000

    Ubuntu

    Joined:
    Jul 3, 2005
    Location:
    UK/US
    #1
    Hello,

    I have to develop a basic app that uses the RL SDK. I've downloaded the SDK and looked around and have to say it seems quite difficult to understand properly. It's default functionality in the sample project is to add the website link from the QR code (or whatever relevant information for other codes) to a table. I'd like to open Safari, or open a webview with the URL loaded.

    The methods defined in the SDK.h file, I can't seem to find where they actually are. I just don't really know where to begin modifying and the documentation is quite limited.

    Does anyone have any experience with it?

    Thanks
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    Seems to me this doesn't really have anything to do with the RL SDK. You have a URL and rather than add it as a row in a table, you'd prefer to open it in Safari or a webView.
     
  3. Ubuntu, Jul 30, 2012
    Last edited: Jul 30, 2012

    Ubuntu thread starter macrumors 68000

    Ubuntu

    Joined:
    Jul 3, 2005
    Location:
    UK/US
    #3
    I should have clarified this in my post. There's a method called doneScanning in the SDK that handles what happens after a code is recognised. From what I can tell it dismisses the camera overlay and adds the results to the table. The issue is I can't seem to be able to find where I can actually edit this method or replace it with my own method. From what I can tell the method in question is in the SDK itself.

    EDIT: Just had a look at the files again, this is what I'm talking about.
    Code:
    @interface CameraOverlayViewController : UIViewController { }
    
    @property (readonly, assign) BarcodePickerController *parentPicker;
    
    - (void)barcodePickerController:(BarcodePickerController*)picker 
    		statusUpdated:(NSDictionary*)status;
    @end
    
    
    /*******************************************************************************
    	BarcodePickerController
    	
    	This ViewController subclass runs the RedLaser scanner, detects barcodes, and
    	notifies its delegate of what it found.
    */
    @interface BarcodePickerController : UIViewController { }
    
    - (void) pauseScanning;
    - (void) resumeScanning;
    - (void) prepareToScan;
    - (void) clearResultsSet;
    - (void) doneScanning;
    - (BOOL) hasFlash;
    - (void) turnFlash:(BOOL)value;
    - (void) requestCameraSnapshot
    Then, in the OverlayController.m file (subclass of CameraOverlayViewController):

    Code:
    NSSet *foundBarcodes = [status objectForKey:@"FoundBarcodes"];
    	if ([foundBarcodes count] && viewHasAppeared)
    	{
    		[self.parentPicker doneScanning];
    	}
     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    I see this:
    Do you know what is acting as the delegate in this case? Do you have a delegate method that you should be implementing?
     
  5. Ubuntu thread starter macrumors 68000

    Ubuntu

    Joined:
    Jul 3, 2005
    Location:
    UK/US
    #5
    Not from what I can see. I contacted support and was told the following:

    Something to look into! I think the most confusing thing for me is there being no implementation file for the SDK. I've never really worked with one before (other than the iOS one of course) but from a quick skim of the documentation it seems that it returns an NSSet called FoundBarcodes. I'll have to look into this in the morning but hopefully I can figure out how to get the URL from the QR code this way.

    Thanks for your help.
     
  6. IDMah macrumors 6502

    IDMah

    Joined:
    May 13, 2011
    #6
    I like Zbar

    Zbar works pretty well for me..

    Unless you need lookup stuff. but remember it can return the full URL which
    you just slap in a webview.

    happy coding.
     

Share This Page