PWA Demos
Device Motion

Device Motion PWA Demo

With the DeviceMotion event, your PWA can detect a device's physical motion into space.

Device Motion Logo

Demo

Install the app, open it from your homescreen, request access to the device's sensors below, then move your device in space to see the values below change.

acceleration:

x: 0m/s²
y: 0m/s²
z: 0m/s²

accelerationIncludingGravity:

x: 0m/s²
y: 0m/s²
z: 0m/s²

rotationRate:

alpha: 0°/s
beta: 0°/s
gamma: 0°/s

Use Cases

The DeviceMotion event is commonly used to detect and track a device's physical motion, encompassing factors such as acceleration and rotation rate.

Various types of PWAs can make use of this event, e.g. mobile gaming, fitness tracking, and augmented reality apps. You can use a device's acceleration, gravity, and gyroscope data, for tasks like virtual object manipulation and spatial interactions.

Code

Links & Documentation

Your app here

Unlock the powers of the web today

Try our PWA toolkit free of charge and without limits for 14 days. No credit card required.

Get started See plans