/ocaml-cordova-plugin-battery-status

Binding OCaml to cordova-plugin-battery-status using gen_js_api.

Primary LanguageMakefileGNU Lesser General Public License v3.0LGPL-3.0

ocaml-cordova-plugin-batterystatus

LGPL-v3 licensed Build Status

Binding to cordova-plugin-batterystatus

What does cordova-plugin-batterystatus do ?

This plugin provides an implementation of an old version of the Battery Status Events API.
It adds the following three events to the window object:
* batterystatus
* batterycritical
* batterylow

Source: cordova-plugin-batterystatus

How to install and compile your project by using this plugin ?

Don't forget to switch to a compiler >= 4.03.0.

opam switch 4.03.0
opam install cordova-plugin-battery-status
  • Else, you can use opam by pinning the repository with
opam pin add cordova-plugin-battery-status https://github.com/dannywillems/ocaml-cordova-plugin-battery-status.git

To compile your project, use

ocamlfind ocamlc -c -o [output_file] -package gen_js_api -package cordova-plugin-battery-status [...] -linkpkg [other arguments]

Don't forget to install cordova-plugin-batterystatus with

cordova plugin add cordova-plugin-batterystatus

How to use ?