This sample code allows you to detect if the device is in motion via the device's accelerometer.
Trigger via API Function | Notification via API Callback | ||||||||
---|---|---|---|---|---|---|---|---|---|
Start Listening for Accelerometer Motion Stop Listening for Accelerometer Motion |
|
||||||||
Check Current State |
|
||||||||
Motion detection callbacks are triggered automatically by the app once listening is started (see above) and device motion is detected based on tilt & orientation of the device. Session length is determined by the 'Motion Detection Reset Period' configured in the app's settings. Clear Motion Log |