cordova-plugin-lightsensor
v1.0.0
Published
Cordova Light Sensor Plugin
Downloads
4
Maintainers
Readme
cordova-plugin-lightsensor
This plugin can be use to get intensity level that falls in to the device. The API supports to one time call and repeated calls which will directed to callback functions.
A successful response receive as a JSON, {"intensity":5}
The value that get from reading
object is in Lux (measurement unit)
Installation
cordova plugin add https://github.com/DeshanKTD/cordova-plugin-lightsensor
Methods
- window.plugin.lightsensor.getReading
- window.plugin.lightsensor.watchReadings
- window.plugin.lightsensor.stop
window.plugin.lightsensor.getReading
This method get a single reading from the lightsensor sensor
reading
object properties
intensity
window.plugin.lightsensor.watchReadings
This helps get reapeated readings from the lightsensor sensor.
reading
object properties
intensity
window.plugin.lightsensor.stop
Stops getting readings from the lightsensor sensor.
Supported Platforms
- Android