SDK API - Worker Feedback

PLEASE NOTE: THE USAGE OF THIS FEATURE IS RESTRICTED AND ONLY AVAILABLE AS BETA THROUGH OUR EARLY ACCESS PROGRAM. PLEASE FILL OUT THE REGISTRATION FORM TO APPLY.

Worker Feedback enables you to trigger the MARK feedback system profiles asynchronously to inform your worker about an event.

Worker Feedback commands, like all commands that trigger an action on MARK, will by default be queued in ProGlove Connect. By providing a special flag in PgCommandParams, this behaviour can be changed to replace the queue with this new command. For more Information about the queueing behaviour click here

Disable the Default Scan Feedback on MARK

By default, MARK will play a positive feedback when a barcode-transmission is started. This can be turned off using the Api Call pgManager.setScannerConfig. The call takes a PgScannerConfig object and an IPgConfigCallback callback object as parameter.

The PgScannerConfig object can be used to change the behavior of MARK - in this case, to disable the default scanning feedback. (Code in Kotlin)

 val config = PgScannerConfig(isDefaultScanAckEnabled = false)

 pgManager.setScannerConfig(config, object : IPgConfigCallback {
    override fun onScannerConfigSuccess(config: PgScannerConfig) {
    // everything worked
    }

    override fun onError(error: PgError) {
    // handle the error
    }
})

Trigger Feedback

To trigger a custom feedback, use the API pgManager.triggerFeedback. The function takes a predefined feedback ID (PgPredefinedFeedback) wrapped in a PgCommand and an implementation of the IPgFeedbackCallback callback as arguments. After the feedback was played successfully on MARK (or in case of any errors) the IPgFeedbackCallback will be called with the relevant information.

The PgPredefinedFeedback ID defines the Feedback Sequence to be played (see below). The convenience function PgPredefinedFeedback.toComamnd() used here to wrap the PgPredefinedFeedback optionally takes a PgCommandParams object, which gives additional control over how the command should be executed. For now we only support the replaceQueue flag here, which if set to true cancels all the commands currently in the queue and adds itself as the first element. More information can be found here

 val feedbackId = PgPredefinedFeedback.SPECIAL_1
 pgManager.triggerFeedback(feedbackId.toCommand(), object : IPgFeedbackCallback {
    override fun onSuccess() {
    // everything worked
    }

    override fun onError(error: PgError) {
    // handle the error
    }
})

Possible Feedback IDs are:

  • PgPredefinedFeedback.SUCCESS - Positive Feedback (ACK) - green
  • PgPredefinedFeedback.ERROR - Negative Feedback (NACK) - red
  • PgPredefinedFeedback.SPECIAL_1 - Special Feedback 1, yellow lights

Trigger Feedback together with setting the screen

If you are using MARK Display together with Worker feedback follow this order to get the best behaviour:

  • set the Screen first
  • send the feedback command afterwards

You don't have to wait for the setScreen command to return before sending the feedback command. The commands are queued automatically and the feedback is triggered immediately after the screen was set. Don't use the replace queue flag as that could cancel the sequence. Make sure not to send the feedback before setting the screen. In that case the screen would only be set after the feedback completed which is not ideal.