# Ievent\_callback\_type.onValues

Source: [https://docs.qualcomm.com/doc/80-PK177-134Y/topic/ievent_callback_type_onvalues1.html](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/ievent_callback_type_onvalues1.html)

每当传感器数据可用时，都会调用此回调。在 proto 消息中编码的实际传感器数据通过此回调传递。客户端需要解码 proto\_encoded\_message 以获取传感器数据。有关详细信息，可参见[编码和解码 protobuf 消息](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/encoding_and_decoding_protobuf_messages.html)。

Ievent_callback_type.onValues(byte[] proto_encoded_message, int sensor_session_id)Copy to clipboard

## 参数

                    - proto\_encoded\_message

                        - proto 编码消息，其中包含传感器数据。

                    - sensor\_session\_id

                        - 指定传感器的会话 ID。

**Parent Topic:** [传感器接口](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/sensor_interfaces.html)

Last Published: Jun 22, 2023

[Previous Topic
Ierror\_callback\_type.onValues](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134Y/topics/ierror_callback_type_onvalues.md) [Next Topic
活动识别 (Activity recognition)](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134Y/topics/activity_recognition.md)