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
onCharacteristicChangedmethod of theBluetoothGattCallbackclass. - Pass the data to the
parsemethod of theMessageHandlerclass. - Receive the resulting
StatusandLocationmessages with aMessageReceiverinstance.
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.