plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[Bug]:

Open bensonarafat opened this issue 3 years ago • 0 comments

Platform

Android 10

Plugin

sensor_plus

Version

1.3.2

Flutter SDK

3.0.3

Steps to reproduce

Sensor not working in real device but working on emulator. I have tried some android device but am not getting any result.

Code Sample

accelerometerEvents.listen((AccelerometerEvent event) {
  print('AccelerometerEvent: $event');
});

userAccelerometerEvents.listen((UserAccelerometerEvent event) {
  print('UseraccelerometerEvent: $event');
});

gyroscopeEvents.listen((GyroscopeEvent event) {
  print('GyroscopeEvent: $event');
});

Logs

════════ Exception caught by services library ══════════════════════════════════
The following PlatformException was thrown while activating platform stream on channel dev.fluttercommunity.plus/sensors/magnetometer:
PlatformException(error, <get-sensor>(...) must not be null, null, null)

Flutter Doctor

√] Flutter (Channel stable, 3.0.3, on Microsoft Windows [Version 10.0.22000.556], locale en-GB)
    • Flutter version 3.0.3 at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 676cefaaff (3 weeks ago), 2022-06-22 11:34:49 -0700
    • Engine revision ffe7b86a1e
    • Dart version 2.17.5
    • DevTools version 2.12.2

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Arafat Benson\AppData\Local\Android\Sdk
    • Platform android-31, build-tools 30.0.3
    • ANDROID_SDK_ROOT = C:\Users\Arafat Benson\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[!] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.6)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.1.32421.90
    X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development
      with C++" workload, and include these components:
        MSVC v142 - VS 2019 C++ x64/x86 build tools
         - If there are multiple build tool versions available, install the latest
        C++ CMake tools for Windows
        Windows 10 SDK

[√] Android Studio (version 2020.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[√] VS Code (version 1.69.0)
    • VS Code at C:\Users\Arafat Benson\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.44.0

[√] Connected device (5 available)
    • itel A23 (mobile)           • 06071350CC003867 • android-arm    • Android 8.1.0 (API 27)
    • sdk gphone x86 arm (mobile) • emulator-5554    • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)           • windows          • windows-x64    • Microsoft Windows [Version 10.0.22000.556]
    • Chrome (web)                • chrome           • web-javascript • Google Chrome 103.0.5060.114

bensonarafat avatar Jul 12 '22 14:07 bensonarafat