Accelerometer crash issue


Accelerometer crashes the app continously in android. I am using this to detect the rotation of device.
Does any one have any idea about this or suggest any other better way to identify rotation of device.

Hey @sreeram123,

Could you provide an MCVE How to create a Minimal, Reproducible Example - Help Center - Stack Overflow for the issue/crash you are encountering? It will help us debug much more efficiently. Using Snack is our preferred method. Also some additional information would be very helpful such as what SDK you are running, what device(s?) the crash is happening on, etc.



Hi @adamjnav:- Here is the link of snack :- Unnamed Snack - Snack.
Run this on android device, i tested in Goggle Nexus 5. Refresh the code for 2-3 times, it crashes.

Configuration details are below.
expo: “^27.0.1”,
react: “16.3.1”,
react-native: “
exp cli version :- 51.4.0

Hi @adamjnav ,

Were you able to reproduce the same ?

@sreeram123 does the app just crash or are there any logs you could provide ?

@aalices :- app just crashes, the movement i comment out the code of accelrometer it works.
As per my understanding it is crashing due addeventlistener of accelerometer which is continously listening to rotation.

I managed to reproduce and created an internal issue. Will post here if we fix it.

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