Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserAccelerometer sensor returns 0 values on some phones #45980

Closed
onetdev opened this issue Dec 3, 2019 · 2 comments
Closed

UserAccelerometer sensor returns 0 values on some phones #45980

onetdev opened this issue Dec 3, 2019 · 2 comments
Labels
e: device-specific Only manifests on certain devices p: sensors Plugin to read from sensors package flutter/packages repository. See also p: labels. platform-android Android applications specifically

Comments

@onetdev
Copy link

onetdev commented Dec 3, 2019

Target Platform: Android
Target OS version/browser: Android 9
Devices: Huawei Mate 9 Pro

I'm currently working on an application detecting phone shakes using UserAccelerometer TYPE_LINEAR_ACCELERATION on Android), but some phones can only produce events with x:0,y:0,z:0 while accelerometer and gyroscope works. (my testing tool)

After investigating the android native code I'm fairly certain that the issues comes from the OS/device itself rather than the Flutter plugin.

I tried to bypass this issue by using the basic accelerometer with gravity, but it turns out that there's more to it than some basic math (like combining multiple sensor inputs in a specific way).

@onetdev onetdev changed the title Sensors plugin returns 0 values UserAccelerometer sensors returns 0 values on some phones Dec 3, 2019
@onetdev onetdev changed the title UserAccelerometer sensors returns 0 values on some phones UserAccelerometer sensor returns 0 values on some phones Dec 3, 2019
@janmoppel janmoppel added e: device-specific Only manifests on certain devices p: first party p: sensors Plugin to read from sensors platform-android Android applications specifically labels Dec 3, 2019
@zoeyfan
Copy link

zoeyfan commented Jan 3, 2020

We're closing this issue because it seems to be a question or request for help rather than a bug in Flutter plugin.

Good places to ask questions or work through problems where you're more likely to get a fast response include:

Thanks for using Flutter!

@zoeyfan zoeyfan closed this as completed Jan 3, 2020
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2021
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e: device-specific Only manifests on certain devices p: sensors Plugin to read from sensors package flutter/packages repository. See also p: labels. platform-android Android applications specifically
Projects
None yet
Development

No branches or pull requests

3 participants