# Encoding and decoding protobuf messages Source: [https://docs.qualcomm.com/doc/80-PK177-134/topic/encoding_and_decoding_protobuf_messages.html](https://docs.qualcomm.com/doc/80-PK177-134/topic/encoding_and_decoding_protobuf_messages.html) This section describes how to encode the message data to get SUID for sensor and send request to the sensor subsystem and decode data, which was sent by sensor subsystem through the callback function. - **[Requesting message](https://docs.qualcomm.com/doc/80-PK177-134/topic/requesting_message.html)** Sensor subsystem can understand only protocol-buffer encoded requests. You must prepare `sns_client_request_msg` for enabling `activity_recognition` sensor with protocol-buffer Java APIs that were generated from the .proto files. - **[Decoding message](https://docs.qualcomm.com/doc/80-PK177-134/topic/decoding_message.html)** This method, which was registered as an event callback, gets triggered by the QESDK sensor manager when events are available with protobuf encoded byte array. **Parent Topic:** [Sensor API](https://docs.qualcomm.com/doc/80-PK177-134/topic/qesdk_sensor_apis.html) Last Published: Nov 14, 2024 [Previous Topic Activity recognition enums](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/activity_recognition_enums.md) [Next Topic Requesting message](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/requesting_message.md)