EPadLink ePad Vision Bedienungsanleitung Seite 11

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 27
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 10
11 www.epadlink.com
Integration Guide (ePad-vision SDK for Chrome & Firefox)
7.3.2 Linux
Below is the Linux version of com.topaz.epadvision.win.json, distributed along with the SDK and it can
be used. Some of the parameters of the file will be changed based on the target machine.
{
"name": "com.topaz.epadvision.win",
"description": "Chrome ePad-vision SDK Native Messaging Host",
path":"/usr/share/ePad/Chrome_extension/SDK/Chrome_NativeMessagingHost/ePadvisionNMHost.exe",
"type": "stdio",
"allowed_origins": [
"chrome-extension://mcjlhkcioghfmodbaapbhgagdcgehmfg/"
]
}
The path field is set to the location where the ePadvisionNMHost.exe located.
7.4 Integrating the native messaging host into applications
The native messaging host can be integrated directly into an extension or web page.
Integration into a web page requires a background extension that acts as a bridge between the
web page and the native messaging host application.
All the APIs required for launching the host, sending messages to the host, and receiving
messages from the host are available in Chrome JavaScript.
Note: The Chrome Native Messaging related JavaScript APIs cannot be accessed directly
from a web page. For security reasons, Chrome allows only an extension to access the native
messaging hosts.
7.5 Launching the native messaging host
Within the extension JavaScript, the following code can be used to launch the native
messaging host application.
var hostName = "com.topaz.epadvision.win";
port = chrome.runtime.connectNative(hostName);
// Register the listener to handle output messages from native messaging host.
port.onMessage.addListener(on
NativeMessage);
// Register the listener to handle native messaging host disconnect or closed.
port.onDisconnect.addListener(onDisconnected);
7.6 ePad-vision device access
The ePad-vision SDK for Chrome is implemented as a Native Messaging Host. As the Google Native
Messaging API framework mandates using Standard Input and Output streams for communication
between the Chrome and the native application, only text data can be exchanged between the
applications. The Input messages trigger communication with device, and the input message itself
contains all the required data as payload.
Seitenansicht 10
1 2 ... 6 7 8 9 10 11 12 13 14 15 16 ... 26 27

Kommentare zu diesen Handbüchern

Keine Kommentare