Class MessageHandler

java.lang.Object
com.signalquest.api.MessageHandler

public class MessageHandler extends Object
Handles the SignalQuest Transport Protocol message parsing for SignalQuest sensors.

Parses Status and Location data received from the message protocol characteristic, using parse(byte[]).

Receive parsed messages using MessageHandler.MessageReceiver.

  • Constructor Details

    • MessageHandler

      public MessageHandler(@NonNull MessageHandler.MessageReceiver receiver)
      Creates a message handler.
      Parameters:
      receiver - Receives the parsed messages.
  • Method Details

    • parse

      public void parse(@NonNull byte[] data) throws ApiException
      Resolves data, received from sensors, into messages.
      Parameters:
      data - The data from BluetoothGattCallback.onCharacteristicChanged(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, byte[])
      Throws:
      ApiException