# cordova-plugin-oic

> Cordova OIC Plugin

Latest version **0.4.0** (published 2016-08-17) · Apache 2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install cordova-plugin-oic
pnpm add cordova-plugin-oic
yarn add cordova-plugin-oic
bun add cordova-plugin-oic
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2016-08-17 |
| First published | 2016-08-17 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Salvatore Iovene |
| Maintainers | siovene |
| Keywords | ecosystem:cordova, cordova-android |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-oic
- Repository: https://github.com/01org/cordova-plugin-ocf
- Homepage: https://github.com/01org/cordova-plugin-ocf#readme
- Issues: https://github.com/01org/cordova-plugin-ocf/issues
- npm.io page: https://npm.io/package/cordova-plugin-oic

## Recent versions

- 0.4.0 (latest) — 2016-08-17

## README

# cordova-plugin-oic

A Cordova plugin to expose the [OIC
specification](https://openconnectivity.org/resources/specifications) to cross
platform applications written in JavaScript.


## Purpose

To provide a plugin which allows using the OIC 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-oic-demo
app](https://github.com/siovene/cordova-plugin-oic-demo).  Build instructions
are located at [its README
file](https://github.com/siovene/cordova-plugin-oic-demo/blob/master/README.md).

## Running tests

This plugin contains a test suite that runs as a Cordova app. Pleae find it at
the [cordova-plugin-oic-tests project
page](https://github.com/siovene/cordova-plugin-oic-tests).


## Quick start with the API

```javascript
var plugin = cordova.require('cordova/plugin/oic');

plugin.onresourcefound = function(event) {
    var resource = event.resource;
    // Do something with the resource.
};

plugin.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 [OIC JS spec for the Soletta
project](https://github.com/zolkis/soletta/blob/master/doc/js-spec/oic.md).

---
_Source: https://npm.io/package/cordova-plugin-oic · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
