Sensors

Contents

This plugin enables sensors on Android devices

Installation

ionic cordova plugin add https://github.com/fabiorogeriosj/cordova-plugin-sensors.gitnpm 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=YOURPRODUCTKEYnpm 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);