I am struggling to figure out how to have my device detect shaking with expo. I see there’s an existing project called react-native-shake-event, but it seems to only work if I detach from expo. Is there an existing way of detecting shake events with expo?
Hi! I think this could be done fairly easily using Expo’s gyroscope API, but I’m not sure if there’s an off-the-shelf library that will just handle it for you.
You could check for a feature request on Canny and create one there if it doesn’t already exist.
Ok I see. Was hoping for an off-the-shelf solution. I’ll use the accelerometer/gyroscope in Expo’s API to write my own. Thanks!
No I never did. In the end it was pretty easy to create my own. I took a look at this stackoverflow post: https://stackoverflow.com/questions/2317428/android-i-want-to-shake-it
I modified one of the solutions I liked and reimplemented it using Expo’s accelerometer.
yeah it was pretty easy . already made one in 10 minutes or so .