Git Product home page Git Product logo

cordova-plugin-bitalino's Introduction

BITalino Cordova Android Plugin

This plugin is HTML5 port of BITalino Java SDK. Java SDK version is 1.1.-SNAPSHOT (built as dependency via gradle).

If features basic BITalino protocol, for ANDROID only.

Bluetooth connection management is not included.

Plugin has been tested with Cordova 5.0.0., Android 4.4.2.

Install

  • New project: cordova create hello com.example.hello HelloWorld
  • Add platform: cordova platform add android
  • Download and install plugin: cordova plugin add https:\\github.com\duxan\cordova-plugin-bitalino.git
  • Build and run: cordova build, cordova run --nobuild

Usage

  • NO need to include JS files in index.html
  • Call BITalinoPlugin.checkBitalino("MAC address", success, failure) or BITalinoPlugin.startBitalino("MAC address", success, failure) from anywhere.
  • Catch callbacks with success and failure functions, like this for example:
var success = function(message) {
    console.log(message);
}

var failure = function() {
    alert("Error calling Plugin");
}
  • Callbacks are optional, but MAC address you have to enter. It is provided with you BITalino kit. Also, you need to have Bluetooth ON and paired with device (PIN is 1234)
  • If you run it via USB debug you can check for logs with logcat: adb logcat | grep "BITalino" and in browser console: chrome://inspect/#devices
  • Basic info will come via Android Toast, too.

TODO

  • stopping methods
  • action isBitalinoUP("MAC")
  • action getBitalinoFrame(Int skip)

cordova-plugin-bitalino's People

Contributors

duxan avatar

Watchers

James Cloos avatar

cordova-plugin-bitalino's Issues

Minimize package dependency in BITalinoPlugin.java

import org.apache.cordova.CordovaWebView;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CordovaInterface;

instead of import org.apache.cordova.*;

and others...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.