IoTize Device Communication protocol for Web views
npm install @iotize/device-com-webview.jshttp link directly in your page.
html
`
$3
`bash
npm install @iotize/device-com-webview.js
`
API
$3
Return true if your app script is running in a webview where the IoTize com protocol has been injected.
Usage
`javascript
let result = IoTizeDeviceComWebview.isIoTizeWebView();
`
$3
Build IoTizeDevice object if it's running inside an IoTize webview. Throw an error otherwise
Usage
`javascript
let iotizeDevice = IoTizeDeviceComWebview.getInjectedIoTizeDevice();
// ...
`
$3
Manually instantiate the communication protocol object.
Usage
`javascript
let protocol = IoTizeDeviceComWebview.WebViewComProtocol();
// Use it to connect with an IoTizeDevice for example
``