目录

Sensor

Overview

Provides APIs for using common sensor features, including the accelerometer, gyroscope, and light sensor. You can use unified APIs to obtain sensor information and subscribe to or unsubscribe from sensor data, simplifying the app development process and reducing development costs. Use scenarios: pedometer, motion tracking, automatic screen brightness adjustment, and game control.

Since: 11

Files

Name Description
oh_sensor.h Declares the APIs for operating sensors, including obtaining sensor information and subscribing to and unsubscribing from sensor data.
oh_sensor_type.h Declares the common sensor attributes.