DeviceMotion rotation object

#1

Hi ,

I am using DeviceMotion to check rotation of mobile but it is not returning ‘rotation’ object inside listener in mobile Moto G4 Plus and in some device it gives.

Please a way to solve this, as i want to know the device rotation around which side it rotates based on which i want my app to perform accordingly.

0 Likes

Device Motion Sensor Unreliable (iOS and Android)
#2

Hi @sreeram123. We’re forwarding whatever the Android OS sends to us, so that device might not be sending rotation events. If you want to try debugging this yourself you could look at DeviceMotionModule.java and try to figure out why those events aren’t happening.

0 Likes

#3

@jesse: Is there any other way by which i can check on which direction device rotates in expo which works fine on all devices ?

0 Likes

#4

We’re just relaying what the OS tells us, so I’m not sure why it’s not working. I don’t have a Moto G4 Plus to test on so it’d be useful if you could try debugging it.

0 Likes

#5

@jesse:- Yes surely, i will check, in the mean time can you please let me know whether by any other means apart from using DeviceMotion i can get the motion of device ?

0 Likes

#6

No, I’m not aware of any other way.

0 Likes

closed #7

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.

0 Likes