Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

intel/cordova-plugin-ocf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

cordova-plugin-ocf

A Cordova plugin to expose the OCF specification to cross platform applications written in JavaScript.

Purpose

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

Building

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.

Running tests

This plugin contains a test suite that runs as a Cordova app. Pleae find it at the cordova-plugin-ocf-tests project page.

Quick start with the API

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.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published