This is a binding to the cordova plugin:
Binding to cordova-plugin-background-mode
This cordova plug-in can be used for applications, who rely on continuous network communication independent of from direct user interactions and remote push notifications.
Source: cordova-plugin-background-mode
Don't forget to switch to a compiler >= 4.03.0.
opam switch 4.03.0
You can use opam by pinning the repository with
opam pin add cordova-plugin-background-mode https://github.com/dannywillems/ocaml-cordova-plugin-background-mode.git
and to compile your project, use
ocamlfind ocamlc -c -o [output_file] -package gen_js_api -package cordova-plugin-background-mode [...] -linkpkg [other arguments]
Don't forget to install the cordova plugin camera with
cordova plugin add cordova-plugin-background-mode
See the official documentation cordova-plugin-background-mode