petrichor
petrichor

Reputation: 1349

Is it possible to detect when the device is lying screen-down?

I'm trying to use accelerometer from react-native-sensors, but numbers don't seem to change relative to the position. They're changing, but kind of randomly. I need to detect when the user picks up the phone from this screen-down position, and when he turns it back. It's my first RN app, so may be you know some good articles on how to read those numbers? I'm testing the app on Android.

Upvotes: 0

Views: 407

Answers (1)

M-shark
M-shark

Reputation: 25

Mobile is lying down means its screen is blocked with something, here you can check Proximity sensor -which basically used during calling (when the mobile screen goes near to the user's face, the screen goes in lock mode).

I am not sure this will help you or not but This may help you.

Upvotes: 1

Related Questions