Skip to content

connect-sdk / de.proglove.sdk / PgManager / takeImage

takeImage

fun takeImage(config:PgImageConfig, timeoutMs:Int, callback:IPgImageCallback):Unit

Take a picture with MARK

If a Mark is connected, set the Mark into image mode and wait for an image to transmitted. In Image Mode, MARK will wait for the user to trigger the taking of a photo. This photo will then be transferred back to us. The relevant methods of the supplied callback will be called with the image (or an error callback in case something did not work).

Parameters

config - the configuration that should be used to capture an image

timeoutMs - the time MARK should stay in image taking mode in milliseconds. If the user does not trigger image taking in the allotted time, the callback will be called with a timeout error. Should be more than 1 second.

callback - callback that will be called with the image once it was received - or with an error.fun takeImage(command:PgCommand<PgImageConfig>, callback:IPgImageCallback):Unit

Take a picture with MARK

Mark is put into image mode and waits for an image to be taken. When an image was taken or the image mode timed out the callback is notified.

Parameters

command - Holding the PgImageConfig and optional de.proglove.sdk.commands.PgCommandParams

callback - callback that will be called with the image once it was received - or with an error.