Home / Implementation Guide / Message Handling
Message Handling
This section covers receiving messages from the SitePoint peripheral.
About Structured Messages
The SitePoint peripheral uses a custom transport protocol to send status and location messages over a single characteristic. The SignalQuest API converts these messages into developer-friendly objects.
Reading Messages
Follow these steps to read messages from the SitePoint peripheral:
- Get message data using the
onCharacteristicChanged
method of theBluetoothGattCallback
class. - Pass the data to the
parse
method of theMessageHandler
class. - Receive the resulting
Status
andLocation
messages with aMessageReceiver
instance.
Examples of this code are included in the BleManager
class.
The LocationParcelable
and StatusParcelable
classes are also provided. These classes are useful for broadcasting the received data using Android Intents.
Next Steps
- NTRIP - Receive NTRIP data from the internet and send it to the SitePoint peripheral for aiding.