A Flutter sensor plugin which provide easy access to the Pitch and Roll on Android and iOS devices.

Overview

Flutter Aeyrium Sensor Plugin

Aeyrium Sensor Plugin

A Flutter sensor plugin which provide easy access to the Pitch and Roll on Android and iOS devices. It was made using TYPE_ROTATION_VECTOR sensor on Android and DeviceMotion on iOS.

Import

To use this plugin, add aeyrium_sensor as a dependency in your pubspec.yaml file. For example:

dependencies:
  aeyrium_sensor: ^1.0.7

Usage

import 'package:aeyrium_sensor/aeyrium_sensor.dart';

AeyriumSensor.sensorEvents.listen((SensorEvent event) {
      //do something with the event , values expressed in radians
      print("Pitch ${event.pitch} and Roll ${event.roll}")
      
    });

Real Demo

We developed this plugin to use it on our Attitude indicator screen. Aeyrium Sensor

Issues

Please file any issues, bugs or feature request as an issue on our GitHub page.

Author

This Aeyrium Sensor plugin for Flutter is developed by Aeyrium Inc

Comments
  • sensor or listener is null

    sensor or listener is null

    Hi,

    I've copied the example , then at the moment to run shows nothing on device!!

    on my debug console says : E/SensorManager( 2627): sensor or listener is null

    Can you help me with this, please?

    opened by Liliana99 8
  • Added FlutterPlugin embedding engine

    Added FlutterPlugin embedding engine

    This update is meant to fix the "The plugin aeyrium_sensor uses a deprecated version of the Android embedding" warning (Issue #12)

    Implemendted according to the docs found here: https://docs.flutter.dev/development/packages-and-plugins/plugin-api-migration

    opened by pavelaron 0
  • The plugin aeyrium_sensor uses a deprecated version of the Android embedding

    The plugin aeyrium_sensor uses a deprecated version of the Android embedding

    The plugin aeyrium_sensor uses a deprecated version of the Android embedding. To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs. If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

    opened by Egorka 0
  • Event doesn't always cancel

    Event doesn't always cancel

    Hi,

    Great package but I'm seeing mixed results with cancelling the stream. I'm recording actions and my app grabs the pitch and roll at the start of a record session, then records events and deducts this first event from each record. I do this because the phone could be at any angle to start with and it needs to be normalised. So grabbing a first value of pitch and roll is vital, and hence I need the stream to close so it doesn't keep updating this value. I use:

    _vectorStream = AeyriumSensor.sensorEvents.listen(
          (SensorEvent event) {
            if (event.pitch != null) {
              _sensorVectorOffset = Vector(event.pitch, event.roll);
              _vectorStream.cancel();
            }
          },
        );
    

    Usually this works for the first four or five attempts and then after that it no longer closes the stream, and starts overriding this offset value.

    Can you please advise what the issue is and how to close your stream consistently?

    Luke

    opened by lukehold 0
  • Roll sensor value jumps from 0 to ~ 2*pi on iPhone 8 when the phone lays flat.

    Roll sensor value jumps from 0 to ~ 2*pi on iPhone 8 when the phone lays flat.

    I have used this library on android (emulator and real device without any problems), however on the iPhone 8 (physical device) the roll sensor value jumps from 0 to approximately 2*pi or 6.28... when the phone lays flat. Whereas on android it changes from 1 to 0 to -1 for example, when i rotate the device. I think, the library should give consistent results on android and iOS. I would prefer it the android way. In the meantime I use this workaraound:

    if(Platform.isIOS){
      if(event.roll < (-1)*pi){
        sensorValue = 2*pi+event.roll;
      } 
      else{         
        sensorValue = event.roll;
      }
    } 
    else{
      sensorValue = event.roll;     //roll in radians for android 
    }
    
    opened by FrankenApps 0
A Simple Flutter Android App, which displays Sensor Data.

sensorz A Simple Flutter Android App, which displays Android Sensor Data. Introduction :: For implementation of UI, this app uses Flutter Framework. C

Anjan Roy 90 Dec 25, 2022
Flutter plugin that leverages Storage Access Framework (SAF) API to get access and perform the operations on files and folders.

Flutter plugin that leverages Storage Access Framework (SAF) API to get access and perform the operations on files and folders.

Vehement 8 Nov 26, 2022
Teach you some of the popular sensor controlling packages that are available in pub.dev

Sensor Packages Introduction to sensor packages: This repo will teach you some of the popular sensor controlling packages that are available in pub.de

Md. Siam 20 Nov 23, 2022
A flutter Application where you can roll die and land on a number on the dice.

dice_roller A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

Shametha K G 9 Oct 17, 2022
Attendancelist - App to add Students attendance based on roll numbers and calculate percentage.

attedance A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

null 0 Jan 1, 2022
Access links between your devices in real time!

Lineker Description Lineker allows you to manage links between your desktop and smartphone in real time, saving and deleting at any time. Create filte

Blackoutseeker 2 Aug 5, 2022
A Flutter plugin for iOS and Android allowing access to the device cameras.

Camera Plugin A Flutter plugin for iOS and Android allowing access to the device cameras. Note: This plugin is still under development, and some APIs

Rebar Ahmad 1 Mar 17, 2020
A Flutter plugin for Android and iOS allowing access to the device cameras, a bit deeper!!

flutter_cameraview A Flutter plugin for Android and iOS allowing access to the device cameras, a bit deeper!!. This plugin was created to offer more a

Herizo Ramaroson 18 Oct 22, 2022
A Flutter plugin for iOS and Android allowing access to the device cameras.

A Flutter plugin for iOS and Android allowing access to the device cameras.

Lightsnap 140 Jan 8, 2023
Flutter blue plus - Flutter plugin for connecting and communicationg with Bluetooth Low Energy devices, on Android and iOS

Introduction FlutterBluePlus is a bluetooth plugin for Flutter, a new app SDK to

null 141 Dec 22, 2022
A Stable GeoFence Library - A flutter project to provide Geo Fence functionality in Android and IOS

A flutter project to provide Geo Fence functionality in Android and IOS Getting Started Android In your AndroidManifest.xml

TARIQUE KHAN 8 Nov 15, 2022
Whatsapp UI clone made with Flutter; it is compatible with any type of Android and iOS devices.

whats_app Whatsapp UI built with Flutter; it is compatible and responsive with any type of Android and iOS devices. Getting Started This project is a

Mustafa Nabavi 4 Sep 23, 2021
With this pack you can use the biometrics systems of Android and IOS devices.

native_auth With this pack you can use the biometrics systems of Android and IOS devices. It will ask for the user which the biometric authentication

Weliton Sousa 7 Nov 2, 2022
Flutter library for sending bytes to Bluetooth devices on Android/iOS

fluetooth A new flutter plugin project. Getting Started This project is a starting point for a Flutter plug-in package, a specialized package that inc

Iandi Santulus 1 Jan 2, 2022
A Flutter plugin for changing the Home Screen, Lock Screen (or both) Wallpaper on Android devices.

wallpaper_manager A Flutter plugin for changing the Home Screen, Lock Screen (or both) Wallpaper(s) on Android devices. Usage Installation In the pubs

Aditya Mulgundkar 38 Nov 28, 2022
This repo contains a collection of permission related Flutter plugins which can be used to request permissions to access device resources in a cross-platform way.

Flutter Permission Plugins Deprecation Notice This repository has been replaced by the Flutter permission_handler plugin and will not longer be mainta

Baseflow 51 Dec 13, 2021
flutter_thrio makes it easy and fast to add flutter to existing mobile applications, and provide a simple and consistent navigator APIs.

中文文档 英文文档 问题集 原仓库不再维护,代码已经很老了 最近版本更新会很快,主要是增加新特性,涉及到混合栈的稳定性的问题应该不多,可放心升级,发现问题加 QQ 群号码:1014085473,我会尽快解决。 不打算好好看看源码的使用者可以放弃这个库了,因为很多设定是比较死的,而我本人不打算花时间写

null 290 Dec 29, 2022
flutter_thrio makes it easy and fast to add flutter to existing mobile applications, and provide a simple and consistent navigator APIs.

本仓库不再维护,可移步新仓库 https://github.com/flutter-thrio/flutter_thrio 中文文档 问题集 QQ 群号码:1014085473 The Navigator for iOS, Android, Flutter. Version 0.2.2 requir

Hellobike 732 Dec 5, 2022
Lite version of smart_select package, zero dependencies, an easy way to provide a single or multiple choice chips.

Lite version of smart_select package, zero dependencies, an easy way to provide a single or multiple choice chips. What's New in Version 2.x.x Added p

Irfan Vigma Taufik 97 Dec 15, 2022