EPadLink ePad Vision Manual de usuario Pagina 12

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 27
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 11
12 www.epadlink.com
Integration Guide (ePad-vision SDK for Chrome & Firefox)
The Output message payload contains the status of the transaction and also signature points, widget
events, etc.
The Native Messaging framework mandates that the input and output messages should be in JSON
format. Native messaging allows you to send multiple attributes as part of the JSON string/message.
The format of the JSON message is
{text: value1, text1: value2}
where ‘text’ and ‘text1’ are the names of the JSON parameters.
The value1and value2 entries are the values in JSON format. These will be used by the native host
application to interpret the signature capture input and process it accordingly. There are no practical
restrictions on the number of parameters, names of the parameters, or the length of the data any
parameter can contain.
Sending input messages to the Native Messaging host.
Chrome API postMessage should be used to send input messages to the Native Messaging Host
message = { "command": 1, "inking": false, "inkRegionx": 0, "inkRegiony": 0, "inkRegionWidth": 0, "inkRegionHeight": 0,
"widgetLayout": confirmXml };
port.postMessage(message);
Receiving output messages
// Register the listener to handle output messages from native messaging host.
port.onMessage.addListener(onNativeMessage);
// Receiving response from Native Host (onNativeMessage Event)
function onNativeMessage(message) {
console.log("onNativeMessage : " + message);
// Write logic to handle the messages received
}
Once an Input message is sent, the Native Messaging Host processes the request and sends
back the status asynchronously to the extension by firing the callback function registered.
Vista de pagina 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 ... 26 27

Comentarios a estos manuales

Sin comentarios