# Sensor callbacks

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

- **[Error callback](https://docs.qualcomm.com/doc/80-PK177-134/topic/ierror_callback_type_onvalues.html)**  

This callback is called asynchronously when there is an error in underlying modules while processing sensor data. The client must stop ongoing operations and clean up the resource and should start sensor session from the beginning.
- **[Event callbacks](https://docs.qualcomm.com/doc/80-PK177-134/topic/ievent_callback_type_onvalues1.html)**  

This callback is called whenever sensor data is available. The actual sensor data encoded in proto message is delivered through this callback. The client needs to decode proto\_encoded\_message to get sensor data. See [Encoding and decoding protobuf messages](https://docs.qualcomm.com/doc/80-PK177-134/topic/encoding_and_decoding_protobuf_messages.html) for more information.

**Parent Topic:** [Sensor API](https://docs.qualcomm.com/doc/80-PK177-134/topic/qesdk_sensor_apis.html)

Last Published: Nov 14, 2024

[Previous Topic
register\_error\_callback](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/register_error_callback.md) [Next Topic
Error callback](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/ierror_callback_type_onvalues.md)