Supported ProGlove Interfaces
SOTI Surf agent should respond to the invocation of ProGlove methods from any web app opened in SOTI Surf, within the following guidelines:
- SOTI Surf will not manage where the scanned barcode value appears on the web page after scan is completed by ProGlove. The barcode value will appear on the focused input field of the webpage.
- The data needed by the ProGlove Intent API will be provided “as is” by the webpages to SOTI Surf via JavaScript interfaces. No data formatting logic will be handled by SOTI Surf.
- The webpage must call SOTI Surf ProGlove JavaScript interface methods to access the respective ProGlove Intent API.
SOTI Surf ProGlove Bridging API
SOTI Surf provides a generic Surf-ProGlove Bridging API which your web page needs to call when triggering scanner actions. Since SOTI Surf provides a generic API, you need to understand the assumptions/prerequisites mentioned at the beginning of this topic.
Launch Pairing Activity API
To connect the device with the ProGlove scanner the scanner must pair with the ProGlove Insight application. The mark-display scanner must scan the pairing barcode generated by the ProGlove Insight application. To ease this process, Launch Pairing Activity API launches the Insight Application’s Pairing Activity. The user must scan the pairing barcode via mark display to establish connection between the device and the scanner.
Method | Parameters | Returns |
---|---|---|
proGlove.proGloveLaunchPairingActivity(); |
None | Void |
Scan Barcode API
No API implementation is required for scanning into a website's input field. The paired scanner will populate the scanned data at the focused input field of the website. SOTI Surf cannot control where the scanned barcode value appears on the web page after scan is completed by ProGlove scanner.
Pick Orientation API
Insight Mobile comes with a dialog to pick the orientation of a display device. To show the dialog, use this API. This API can be consumed by the website opened in the SOTI Surf browser.
Method | Parameters | Returns |
---|---|---|
proGlove.proGlovePickOrientation(); |
None | Void |
Disconnect Display API
Disconnects a Mark Display scanner device.
Method | Parameters | Returns |
---|---|---|
proGlove.proGloveDisconnectDisplay(); |
None | Void |
Set Screen API
null
for using their default value.Method | Parameters | Returns |
---|---|---|
proGlove. setScreen(String templateId, String data,
String separator, String refresh Type, String
durationInMs) |
templateId String -The ID of the selected template. Template IDs are unique identifiers for each template layout, that need to be set during the integration process. Example:
String- The selected header and content data in the given template. Example:
String- (Optional) Needed to parse the DATA correctly , Default separator will be ";"
String- (Optional) The refresh type used for the screen update. Example:
String
(Optional) If this is provided, a notification screen will be
set for this time. With this parameter you can specify whether
you want to set the screen as a notification (>0) or as a
permanent screen (=0 or not provided).A value of 0 represents a
permanent screen. A value <0 will result in a permanent
screen as well. Note: The refresh type parameter will be ignored
if you set a notification screen. These will always use
PARTIAL_REFRESH. Example API implementation:
|
Void |
Worker Feedback API
<!DOCTYPE html>
<html>
<body>
<h1>WORKER FEEDBACK DEMO</h1>
<p id="demo">Trigger Feedback Type: </p>
<select id="feedback">
<option value="1">ACK</option>
<option value="2">NACK</option>
<option value="3">Yellow</option>
<option value="4">Purple</option>
<option value="5">Cyan</option>
</select>
<button onclick="triggerFeedback()">Trigger Single Feedback</button><br><br>
<label for="inorder">Mutiple Feedback Sequence In order: </label>
<input type="text" id="inorder" name="inorder">
<button onclick="triggerInorderFeedback()">Trigger Multiple Feedback</button><br>
<br>
<!-- Rounded switch -->
<label class="switch">
<input type="checkbox" id="check">
</label>
<label for="duration">Enable/Disable Default Scan Feedback </label>
<button onclick="enableDefaultScanFeedback()">Set Default Scan Feedback</button><br>
<script>
function triggerFeedback(){
var e = document.getElementById("feedback");
var feedback = e.value;
var time = new Date();
document.getElementById("demo").innerHTML = parseInt(feedback) + " triggerFeedback Command Triggered at "+time;
proGlove.proGloveTriggerPlayFeedback(parseInt(feedback));
}
function triggerInorderFeedback(){
var time = new Date();
var sequence = document.getElementById("inorder").value;
var arrayInt;//change string csv to int array
if (sequence.length === 0) {
arrayInt = new Array();
} else {
arrayInt = sequence.replace(/, +/g, ",").split(",").map(Number);
}
document.getElementById("demo").innerHTML = arrayInt + " triggerInorderFeedback Command Triggered at "+time;
proGlove.proGloveTriggerMultiplePlayFeedback(arrayInt);
}
function enableDefaultScanFeedback(){
var e = document.getElementById("feedback");
var feedback = e.value;
var time = new Date();
var booleanValue = 0;
if (document.getElementById("check").checked) {
booleanValue=1;
}
document.getElementById("demo").innerHTML = Boolean(booleanValue) + " enableDefaultScanFeedback Command Triggered at "+time;
proGlove.proGloveEnableDefaultScanFeedback(Boolean(booleanValue));
}
</script>
</body>
</html>
Trigger Feedback API
Triggers a feedback sequence on the connected scanner.
Method | Parameters | Returns |
---|---|---|
proGlove.proGloveTriggerPlayFeedback(Int
feedbackId); |
feedbackId Int value. Valid value should be one of the following:
|
Void |
Trigger Multiple Sequence Feedback API
API allows you to play multiple sequences with one request. Since there is no callback , it is impossible to react upon a finished sequence to start another one right away. Order of execution will be in sequential order of Array input.
Method | Parameters | Returns |
---|---|---|
proGloveTriggerMultiplePlayFeedback(Array[]
feedbackIntArrayIds); |
feedbackIntArrayIds Array of Integer values. Order of execution will be in sequential order of the ids provided in the array. Example: |
Void |
Disable default scan Feedback API
By default, the scanner returns positive feedback when a barcode transmission is started. The default scan feedback (green LED blinking twice) can be disabled/enabled by calling this API. This setting is lost when disconnected.
Method | Parameters | Returns |
---|---|---|
proGlove.proGloveEnableDefaultScanFeedback(Boolean
enable); |
enable Boolean value – True and false for enabling and disabling default scan feedback, respectively. |
Void |
Get Scanner Connection State
This API will print the state of the connection of ProGlove scanner in a message on screen. If the scanner is connected, a “Scanner is connected, you can start scanning” message appears. If the scanner is not connected, a “No scanner connected” message appears.
Method | Parameters | Returns |
---|---|---|
proGlove.getScannerConnectionState (); |
None | Void |
Connect Scanner
This API will connect the scanner if it is not connected.
Method | Parameters | Returns |
---|---|---|
proGlove.connectScanner (); |
None | Void |