Sensors

Contents

This plugin enables sensors on Android devices

https://github.com/fabiorogeriosj/cordova-plugin-sensors.git

Stuck on a Cordova issue?

Installation

Community Enterprise
ionic cordova plugin add https://github.com/fabiorogeriosj/cordova-plugin-sensors.git npm install @ionic-native/sensors
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More   or   Contact Us
ionic enterprise register --key=YOURPRODUCTKEY npm install @ionic-enterprise/sensors

Supported Platforms

  • Android

Usage

import { Sensors, TYPE_SENSOR } from '@ionic-native/sensors/ngx';


constructor(private sensors: Sensors) { }

...


this.sensors.enableSensor(TYPE_SENSOR.LIGHT);