DISCONTINUATION OF PROJECT.
This project will no longer be maintained by Intel.
Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.
Intel no longer accepts patches to this project.
If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the open source software community, please create your own fork of this project.
A Cordova plugin to expose the OCF specification to cross platform applications written in JavaScript.
To provide a plugin which allows using the OCF specification across all mobile platforms without requiring the user to deal with implementing and compiling the native code for each operating system.
Current platforms:
- Android
As this is a Cordova plugin, you will build it as part of an app. For a demo app, please see the cordova-plugin-ocf-demo app. Build instructions are located at its README file.
This plugin contains a test suite that runs as a Cordova app. Pleae find it at the cordova-plugin-ocf-tests project page.
var plugin = cordova.require('cordova/plugin/ocf');
plugin.onresourcefound = function(event) {
var resource = event.resource;
// Do something with the resource.
resource.onupdate = function(event) {
var updates = event.updates;
// Update your UI when changes have occurred.
};
};
plugin.setBackend('iotivity').then(function() {
plugin.findResources();
});
More details can be found at the OCF JS spec for the Soletta project.