The Evothings Viewer app ships with selected Cordova plugins, which are listed below.
Evothings also provides a number of JavaScript libraries for IoT, built on top of the Cordova plugins.
Below you find API documentation for plugins and libraries.
Evothings Viewer comes pre-packaged with the following Cordova Plugins.
Note that the JavaScript source files for the plugins are packaged into Evothings Viewer. You don't need to explicitly include these files in your HTML code, they are included automatically with cordova.js.
Evothings Bluetooth Low Energy (BLE) Plugin [API Reference] [Tutorial] [GitHub]
Bluetooth Serial Plugin (available in Evothings Viewer for Android only)
Evothings Eddystone Library (written on top of the BLE plugin) [API Reference] Library file: [eddystone.dist.js]
Evothings JavaScript libraries provide essential functionality for IoT enabled mobile apps:
cordova.js
in your index.html
file and you will have the API available.Since Cordova loads plugins asynchronously, you should always wait for the Cordova 'deviceready' event before calling any plugin APIs or library functions. Here is an example:
function main() { // Cordova plugins are loaded, plugin APIs are ready to be used. } document.addEventListener( 'deviceready', main, false)
Browse the JSDoc generated API documentation for the Evothings JavaScript libraries to learn more.
The source code for the libraries is included with each example app that is available in Evothings Studio, and is also found on GitHub: https://github.com/evothings/evothings-libraries