EN | RU
sensors_plus_aurora
Original Readme.
Description
The Aurora implementation of sensors_plus.
A Flutter plugin to access device sensor data with additional Aurora OS specific sensors. This plugin provides comprehensive sensor monitoring capabilities, including standard accelerometer, gyroscope, and magnetometer sensors, plus Aurora OS unique sensors for device orientation, compass, proximity, and more. Essential for applications that need sensor-based interactions, motion detection, or device-aware functionality on Aurora OS platform.
Quickstart: Basic Usage Example
import 'package:sensors_plus/sensors_plus.dart';
import 'package:sensors_plus_aurora/sensors_plus_aurora.dart';
// Access standard sensors
accelerometerEventStream().listen((event) {
print('Accelerometer: ${event.x}, ${event.y}, ${event.z}');
});
gyroscopeEventStream().listen((event) {
print('Gyroscope: ${event.x}, ${event.y}, ${event.z}');
});
// Access Aurora OS specific sensors
SensorsPlusAurora().onChangeOrientation.listen((event) {
print('Device Orientation: $event');
});
SensorsPlusAurora().onChangeCompass.listen((event) {
print('Compass Heading: $event');
});
SensorsPlusAurora().onChangeProximity.listen((event) {
print('Proximity: $event');
});
Features
- Standard Sensor Support - Accelerometer, gyroscope, magnetometer, and barometer
- Real-time Data Stream - Continuous sensor data updates via streams
- Multiple Sensor Types - Support for various sensor categories
- Easy Integration - Simple API with minimal setup required
Contents
Installation and build
pubspec.yaml
dependencies:
sensors_plus: ^6.1.0
sensors_plus_aurora:
git:
url: https://developer.auroraos.ru/git/flutter/flutter-community-plugins/sensors_plus_aurora.git
To use the plugin, you need to enable Qt support in aurora/main.cpp:
#include <flutter/flutter_compatibility_qt.h> // Add for Qt
#include "generated_plugin_registrant.h"
int main(int argc, char *argv[]) {
aurora::FlutterApp app(argc, argv);
aurora::EnableQtCompatibility();
return app.exec();
}
Compatibility
The plugin has been working correctly since the 5.0.0 version of the Aurora OS.
Terms of Use and Participation
The source code of the project is provided under the license, that allows it to be used in third-party applications.
To participate in the development of the project, please read the contributor agreement. If you plan to contribute your own source code to the project, you will need to accept the CLA agreement.
For information about contributors see AUTHORS.
Code of conduct is a current set of rules of the Open Mobile Platform which informs you how we expect the members of the community will interact while contributing and communicating.