@iotize/device-com-mock.js
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-alpha.16 • Public • Published

IoTize Device Com Webview

IoTize communication protocol that proxy commmunication between your javascript app running inside a webview and the native application.

Installation

Browser

Download latest version to your website directory or or use the http link directly in your page.

<script src="https://cdn.jsdelivr.net/npm/@iotize/device-com-webview.js@latest/dist/iotize-device-com-webview.min.js"/>

npm

npm install @iotize/device-com-webview.js

API

IoTizeDeviceComWebview::isIoTizeWebView()

Return true if your app script is running in a webview where the IoTize com protocol has been injected.

Usage

let result = IoTizeDeviceComWebview.isIoTizeWebView();

IoTizeDeviceComWebview::getInjectedIoTizeDevice()

Build IoTizeDevice object if it's running inside an IoTize webview. Throw an error otherwise

Usage

let iotizeDevice = IoTizeDeviceComWebview.getInjectedIoTizeDevice();
// ...

IoTizeDeviceComWebview::getInjectedIoTizeDevice()

Manually instantiate the communication protocol object.

Usage

let protocol = IoTizeDeviceComWebview.WebViewComProtocol();
// Use it to connect with an IoTizeDevice for example

For more informations, read the documentation.

Package Sidebar

Install

npm i @iotize/device-com-mock.js

Weekly Downloads

1

Version

0.0.1-alpha.16

License

none

Unpacked Size

732 kB

Total Files

16

Last publish

Collaborators

  • behnaz.bouchiat
  • gvercasson
  • iotize-dev
  • stephane.leonard
  • stephane.leonard.iotize