Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Ubuntu

macrumors 68020
Original poster
Jul 3, 2005
2,184
526
UK/US
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
 
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.

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.
 
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.

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];
	}
 
Last edited:
I see this:
/*******************************************************************************
BarcodePickerController

This ViewController subclass runs the RedLaser scanner, detects barcodes, and
notifies its delegate of what it found.
*/

Do you know what is acting as the delegate in this case? Do you have a delegate method that you should be implementing?
 
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?

Not from what I can see. I contacted support and was told the following:

RedLaser said:
You probably first want to deal with barcodePickerController:statusUpdated. This returns a number of useful bits of information (again, refer to the documentation), part of which includes a set of found barcodes. Assuming the user scanned a QR code which contained a URL, the URL would be included in this set.

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.
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.