Stay organized with collections
Save and categorize content based on your preferences.
SensorAdditionalInfo
open class SensorAdditionalInfo
This class represents a Sensor
additional information frame, which is reported through listener callback onSensorAdditionalInfo
.
Summary
Constants |
static Int |
Mark the beginning of a set of additional info frames.
|
static Int |
Mark the end of a set of additional info frames.
|
static Int |
Internal temperature.
|
static Int |
Sampling parameter.
|
static Int |
Sensor placement.
|
static Int |
Untracked delay.
|
static Int |
Vector calibration parameter.
|
Properties |
FloatArray! |
Additional info payload data represented in float values.
|
IntArray! |
Additional info payload data represented in int values.
|
Sensor! |
The sensor that generated this event.
|
Int |
Sequence number of frame for a certain type.
|
Int |
Type of this additional info frame.
|
Constants
TYPE_FRAME_BEGIN
static val TYPE_FRAME_BEGIN: Int
Mark the beginning of a set of additional info frames.
Value: 0
TYPE_FRAME_END
static val TYPE_FRAME_END: Int
Mark the end of a set of additional info frames.
Value: 1
TYPE_INTERNAL_TEMPERATURE
static val TYPE_INTERNAL_TEMPERATURE: Int
Internal temperature. Sensor hardware device internal temperature. Payload: floatValues[0]: internal temperature in Celsius.
Value: 65537
TYPE_SAMPLING
static val TYPE_SAMPLING: Int
Sampling parameter. Describes the raw sample period and estimated jitter of sample time in terms of standard deviation. Payload: floatValues[0]: raw sample period in seconds. floatValues[1]: standard deviation of sampling period.
Value: 65540
TYPE_SENSOR_PLACEMENT
static val TYPE_SENSOR_PLACEMENT: Int
Sensor placement. Provides the orientation and location of the sensor element in terms of the Android coordinate system. This data is given as a 3x4 matrix consisting of a 3x3 rotation matrix (R) concatenated with a 3x1 location vector (t). The rotation matrix provides the orientation of the Android device coordinate frame relative to the local coordinate frame of the sensor. Note that assuming the axes conventions of the sensor are the same as Android, this is the inverse of the matrix applied to raw samples read from the sensor to convert them into the Android representation. The location vector represents the translation from the origin of the Android sensor coordinate system to the geometric center of the sensor, specified in millimeters (mm).
Payload: floatValues[0..11]
: 3x4 matrix in row major order [R; t]
Example: This raw buffer: {0, 1, 0, 0, -1, 0, 0, 10, 0, 0, 1, -2.5}
Corresponds to this 3x4 matrix:
Orientation |
Location |
0 |
1 |
0 |
0 |
-1 |
0 |
0 |
10 |
0 |
0 |
1 |
-2.5 |
The sensor is oriented such that:
- The device X axis corresponds to the sensor's local -Y axis
- The device Y axis corresponds to the sensor's local X axis
- The device Z axis and sensor's local Z axis are equivalent
In other words, if viewing the origin of the Android coordinate system from the positive Z direction, the device coordinate frame is to be rotated 90° counter-clockwise about the Z axis to align with the sensor's local coordinate frame. Equivalently, a vector in the Android coordinate frame may be multiplied with R to rotate it 90° clockwise (270° counter-clockwise), yielding its representation in the sensor's coordinate frame. Relative to the origin of the Android coordinate system, the physical center of the sensor is located 10mm in the positive Y direction, and 2.5mm in the negative Z direction.
Value: 65539
TYPE_UNTRACKED_DELAY
static val TYPE_UNTRACKED_DELAY: Int
Untracked delay. Delays that are introduced by data processing, such as filtering, which is not taken into account by sensor timestamps. Payload: floatValues[0]: delay estimation in seconds floatValues[1]: delay estimation standard deviation
Value: 65536
TYPE_VEC3_CALIBRATION
static val TYPE_VEC3_CALIBRATION: Int
Vector calibration parameter. Calibration applied to a sensor with 3 elements vector output, such as accelerometer, gyro, etc. Payload: floatValues[0..11]: First 3 rows of a homogeneous matrix in row major order that captures any linear transformation, including rotation, scaling, shear, shift.
Value: 65538
Properties
floatValues
val floatValues: FloatArray!
Additional info payload data represented in float values. Depending on the type of information, this may be null.
intValues
val intValues: IntArray!
Additional info payload data represented in int values. Depending on the type of information, this may be null.
sensor
val sensor: Sensor!
The sensor that generated this event. See SensorManager
for details.
serial
val serial: Int
Sequence number of frame for a certain type.
type
val type: Int
Type of this additional info frame.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# SensorAdditionalInfo\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nSensorAdditionalInfo\n====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/hardware/SensorAdditionalInfo \"View this page in Java\") \n\n```\nopen class SensorAdditionalInfo\n```\n\n|---|--------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.hardware.SensorAdditionalInfo](#) |\n\nThis class represents a [Sensor](/reference/kotlin/android/hardware/Sensor) additional information frame, which is reported through listener callback [onSensorAdditionalInfo](/reference/kotlin/android/hardware/SensorEventCallback#onSensorAdditionalInfo(android.hardware.SensorAdditionalInfo)).\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TYPE_FRAME_BEGIN](#TYPE_FRAME_BEGIN:kotlin.Int) Mark the beginning of a set of additional info frames. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TYPE_FRAME_END](#TYPE_FRAME_END:kotlin.Int) Mark the end of a set of additional info frames. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TYPE_INTERNAL_TEMPERATURE](#TYPE_INTERNAL_TEMPERATURE:kotlin.Int) Internal temperature. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TYPE_SAMPLING](#TYPE_SAMPLING:kotlin.Int) Sampling parameter. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TYPE_SENSOR_PLACEMENT](#TYPE_SENSOR_PLACEMENT:kotlin.Int) Sensor placement. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TYPE_UNTRACKED_DELAY](#TYPE_UNTRACKED_DELAY:kotlin.Int) Untracked delay. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TYPE_VEC3_CALIBRATION](#TYPE_VEC3_CALIBRATION:kotlin.Int) Vector calibration parameter. |\n\n| Properties ||\n|--------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html)! | [floatValues](#floatValues:kotlin.FloatArray) Additional info payload data represented in float values. |\n| [IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)! | [intValues](#intValues:kotlin.IntArray) Additional info payload data represented in int values. |\n| [Sensor](/reference/kotlin/android/hardware/Sensor)! | [sensor](#sensor:android.hardware.Sensor) The sensor that generated this event. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [serial](#serial:kotlin.Int) Sequence number of frame for a certain type. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [type](#type:kotlin.Int) Type of this additional info frame. |\n\nConstants\n---------\n\n### TYPE_FRAME_BEGIN\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val TYPE_FRAME_BEGIN: Int\n```\n\nMark the beginning of a set of additional info frames. \n\n Value: 0\n\n### TYPE_FRAME_END\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val TYPE_FRAME_END: Int\n```\n\nMark the end of a set of additional info frames. \n\n Value: 1\n\n### TYPE_INTERNAL_TEMPERATURE\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val TYPE_INTERNAL_TEMPERATURE: Int\n```\n\nInternal temperature. Sensor hardware device internal temperature. Payload: floatValues\\[0\\]: internal temperature in Celsius. \n\n Value: 65537\n\n### TYPE_SAMPLING\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val TYPE_SAMPLING: Int\n```\n\nSampling parameter. Describes the raw sample period and estimated jitter of sample time in terms of standard deviation. Payload: floatValues\\[0\\]: raw sample period in seconds. floatValues\\[1\\]: standard deviation of sampling period. \n\n Value: 65540\n\n### TYPE_SENSOR_PLACEMENT\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val TYPE_SENSOR_PLACEMENT: Int\n```\n\nSensor placement. Provides the orientation and location of the sensor element in terms of the Android coordinate system. This data is given as a 3x4 matrix consisting of a 3x3 rotation matrix (R) concatenated with a 3x1 location vector (t). The rotation matrix provides the orientation of the Android device coordinate frame relative to the local coordinate frame of the sensor. Note that assuming the axes conventions of the sensor are the same as Android, this is the inverse of the matrix applied to raw samples read from the sensor to convert them into the Android representation. The location vector represents the translation from the origin of the Android sensor coordinate system to the geometric center of the sensor, specified in millimeters (mm).\n\n**Payload** : `floatValues[0..11]`: 3x4 matrix in row major order \\[R; t\\]\n\n**Example** : This raw buffer: `{0, 1, 0, 0, -1, 0, 0, 10, 0, 0, 1, -2.5}` \nCorresponds to this 3x4 matrix:\n\n|----|---|---|----------|\n| Orientation ||| Location |\n| 0 | 1 | 0 | 0 |\n| -1 | 0 | 0 | 10 |\n| 0 | 0 | 1 | -2.5 |\n\nThe sensor is oriented such that:\n\n- The device X axis corresponds to the sensor's local -Y axis\n- The device Y axis corresponds to the sensor's local X axis\n- The device Z axis and sensor's local Z axis are equivalent\n\nIn other words, if viewing the origin of the Android coordinate system from the positive Z direction, the device coordinate frame is to be rotated 90° counter-clockwise about the Z axis to align with the sensor's local coordinate frame. Equivalently, a vector in the Android coordinate frame may be multiplied with R to rotate it 90° clockwise (270° counter-clockwise), yielding its representation in the sensor's coordinate frame. Relative to the origin of the Android coordinate system, the physical center of the sensor is located 10mm in the positive Y direction, and 2.5mm in the negative Z direction.\n\n\u003cbr /\u003e\n\n Value: 65539\n\n### TYPE_UNTRACKED_DELAY\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val TYPE_UNTRACKED_DELAY: Int\n```\n\nUntracked delay. Delays that are introduced by data processing, such as filtering, which is not taken into account by sensor timestamps. Payload: floatValues\\[0\\]: delay estimation in seconds floatValues\\[1\\]: delay estimation standard deviation \n\n Value: 65536\n\n### TYPE_VEC3_CALIBRATION\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val TYPE_VEC3_CALIBRATION: Int\n```\n\nVector calibration parameter. Calibration applied to a sensor with 3 elements vector output, such as accelerometer, gyro, etc. Payload: floatValues\\[0..11\\]: First 3 rows of a homogeneous matrix in row major order that captures any linear transformation, including rotation, scaling, shear, shift. \n\n Value: 65538\n\nProperties\n----------\n\n### floatValues\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval floatValues: FloatArray!\n```\n\nAdditional info payload data represented in float values. Depending on the type of information, this may be null. \n\n### intValues\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval intValues: IntArray!\n```\n\nAdditional info payload data represented in int values. Depending on the type of information, this may be null. \n\n### sensor\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval sensor: Sensor!\n```\n\nThe sensor that generated this event. See [SensorManager](/reference/kotlin/android/hardware/SensorManager) for details. \n\n### serial\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval serial: Int\n```\n\nSequence number of frame for a certain type. \n\n### type\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval type: Int\n```\n\nType of this additional info frame."]]