Scanner Go Protocol
Here is a complete reference to Scanner Go’s url protocal:
Launch Scanner Go on iOS -
ilu://x-callback-url/scanner-go or
ilu://scanner-go
Required Callback Parameters -
x-source= an html encoded name for your source application or action
x-success= the URL to open after a scan is successfully completed
sg-result= the key Scanner Go should use for the scanned result text. This key and the scanned result value are appended to the end of the x-success url.
Example 1:
calling: “ilu://x-callback-url/scanner-go?x-source=Shop%20Google&x-success=http://www.google.com/search?tbm=shop&sg-result=q”
returns: “http://www.google.com/search?tbm=shop&q=[Scanner Go Result]”
This link will call Google’s shopping search for the scanned text, with the user readable label of “Shop Google” in the history table.
Example 2:
For a working example of a Filemaker Go scanning application, download this sample file. Install it on your iOS device and open it in Filemaker Go. Clicking on the “Scan” Button launches Scanner Go to read a barcode, then returns the value to Filemaker Go, which creates a new record with the barcode value.
Example 3:
From Safari on your iOS device with Scanner Go installed, click on this link to search a barcode on Amazon.com.
URL code:
<a title="Search Amazon" href="ilu://x-callback-url/scanner-go?x-source=Search%20Amazon&x-success=http://www.amazon.com/gp/aw/s/ref=is_box?&sg-result=k">search a barcode on Amazon.com</a>
Optional Parameters -
x-cancel= the URL to open if scanning is canceled before a successful result is scanned
x-error= the URL to open if an error is encountered parsing the URL parameters, during scanning, or calling back the URL.
sg-camera= [FRONT or BACK, defaults to BACK] Should Scanner Go initialize the front camera for scanning if available?
sg-history= [YES or NO, defaults to YES] Should Scanner Go save your result and action for user execution at a later time?
Sample Integration Code -
//* Check for ability to open url
NSURL *openScannerURL = [NSURL urlWithString: @"ilu://x-callback-url/scanner-go?x-source=My%20App&x-success=http://www.google.com/search?tbm=shop&sg-result=barcode"];
UIApplication* mainApp = [UIApplication sharedApplication];
if ( [mainApp canOpenURL: openScannerURL] ) {
[mainApp openURL: openScannerURL];
} else {
//* Set alert and find in app store
UIAlertView * invalidURL = [[UIAlertView alloc] initWithTitle: @"Scanner Go"
message: [NSString stringWithFormat: @"Unable to initiate barcode scanner. View Scanner Go in App store to install."
delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles: @"View", nil];
[invalidURL show];
}}
-(void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
//* If view is selected, open App Store
if (buttonIndex == 1) {
UIApplication* mainApp = [UIApplication sharedApplication];
[mainApp openURL: [NSURL URLWithString:@"http://itunes.apple.com/us/app/scanner-go/id498868298?mt=8"]];
}
}
RSS
Apr 15, 2012 @ 16:55:35
Is there no way to tell to Scanner Go that it don’t stop (that oblige us to make a clic on the button to go back to filemaker, this will be nicer without this extra step)
Best Regards
Apr 18, 2012 @ 17:13:55
Update to the newest version of Scanner Go (1.1). If the x-success parameter is detected, it will return immediately, saving you a click.