Consists of the several objects that enable access to the following native sensors available in mobile devices:
Device motion sensor, to return:
Acceleration values, expressed in m/s2, excluding gravity.
Attitude (Euler's vector). The rotation vector represents the orientation of the device as a combination of an angle and an axis, in which the device has rotated through an angle θ around an axis <x, y, z>.
Gravity force value, expressed in m/s2.
Gyroscope values, returned in radians/second to measure the rate of rotation around the device's local X, Y and Z axis.
Magnetometer values, returned in micro-Teslas to measure the ambient magnetic field in the device's X, Y and Z axis.
Altimeter, to return:
Altitude delta (compared to a previous measurement), expressed in meters.
Ambient air pressure, expressed in hPa.
Pedometer, to return step count (counted from the first use).
Activity sensor, to return estimated type of user activity (walking, running, standing still, etc.) along with confidence percentage.
The Motion API provides direct access to data coming from the sensors. To receive data
sent from the native side of the API at a specified interval, it is necessary to start the
collection of data with an object that receives updates. In order to initiate individual
sensors, it is necessary to establish objects using the
launchbox.Motion.<objectName>
reference.
The API preserves any information it retrieves, in case Pega Mobile Client gets stopped by the Android operating system. Once the external activity finishes, the main activity is restarted and Pega Mobile Client notifies the user about further steps. The user may decide to re-capture the information or use the preserved data.