Accelerometer crash issue


#1

Hi,

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.


#2

Hey @sreeram123,

Could you provide an MCVE https://stackoverflow.com/help/mcve for the issue/crash you are encountering? It will help us debug much more efficiently. Using Snack https://snack.expo.io/ 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.

Cheers,

Adam


#3

Hi @adamjnav:- Here is the link of snack :- https://snack.expo.io/rkvl-3kWQ.
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: “https://github.com/expo/react-native/archive/sdk-27.0.0.tar.gz
exp cli version :- 51.4.0


#4

Hi @adamjnav ,

Were you able to reproduce the same ?


#5

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


#6

@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.


#7

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


closed #8

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