Modern web browsers give the user more control over what data they’re sharing with websites, for example location services and access to the camera.

However I recently noticed a gap of how websites can determine the activity of the user based on the acceleration and gyro sensor built into modern smartphones, including the iPhone and Android phones.

Using that data, any website can determine if the user is using their phone while

  • sitting
  • standing
  • walking
  • running
  • driving
  • taking a picture
  • lying in bed
  • laying the phone on a table

and probably more, including guesses if the user is actively using their phone at this moment, or even if they’re impaired by alcohol.

Open on GitHub

Live demo