package Ġde . p ache co . ble playground Ċ Ċ import Ġandroid . bluetooth . Bluetooth Gatt Ċ import Ġandroid . bluetooth . Bluetooth Gatt Callback Ċ import Ġandroid . bluetooth . Bluetooth GattCharacteristic Ċ import Ġandroid . bluetooth . Bluetooth Gatt Descriptor Ċ import Ġjava . util .* Ċ Ċ class ĠB le Gatt CallBack ( val Ġble Gatt Activity : ĠB le Gatt Activity ) Ġ: ĠBluetooth Gatt Callback () Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġon Characteristic Changed ( g att : ĠBluetooth Gatt ?, Ġcharacteristic : ĠBluetooth GattCharacteristic ?) Ġ{ ĊĠĠĠĠĠĠĠ ĠLog Helper . print It (" on Characteristic Changed ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Characteristic Read ( g att : ĠBluetooth Gatt ?, Ġcharacteristic : ĠBluetooth GattCharacteristic ?, Ġstatus : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ ĠLog Helper . print It (" on Characteristic Read ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Characteristic Write ( g att : ĠBluetooth Gatt ?, Ġcharacteristic : ĠBluetooth GattCharacteristic ?, Ġstatus : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ ĠLog Helper . print It (" on Characteristic Write ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Connection StateChange ( g att : ĠBluetooth Gatt ?, Ġstatus : ĠInt , ĠnewState : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ ĠLog Helper . print It (" on Connection StateChange ") ĊĠĠĠĠĠĠĠ Ġg att ?. discover Services () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Descriptor Read ( g att : ĠBluetooth Gatt ?, Ġdescriptor : ĠBluetooth Gatt Descriptor ?, Ġstatus : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ ĠLog Helper . print It (" on Descriptor Read ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Descriptor Write ( g att : ĠBluetooth Gatt ?, Ġdescriptor : ĠBluetooth Gatt Descriptor ?, Ġstatus : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ ĠLog Helper . print It (" on Descriptor Write ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon M tu Changed ( g att : ĠBluetooth Gatt ?, Ġmt u : ĠInt , Ġstatus : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ ĠLog Helper . print It (" on M tu Changed ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Phy Read ( g att : ĠBluetooth Gatt ?, Ġtx Phy : ĠInt , Ġrx Phy : ĠInt , Ġstatus : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ ĠLog Helper . print It (" on Phy Read ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Phy Update ( g att : ĠBluetooth Gatt ?, Ġtx Phy : ĠInt , Ġrx Phy : ĠInt , Ġstatus : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ ĠLog Helper . print It (" on Phy Update ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Read Remote R ssi ( g att : ĠBluetooth Gatt ?, Ġr ssi : ĠInt , Ġstatus : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ ĠLog Helper . print It (" on Read Remote R ssi ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Rel iable Write Completed ( g att : ĠBluetooth Gatt ?, Ġstatus : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ ĠLog Helper . print It (" on Rel iable Write Completed ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Services Dis covered ( g att : ĠBluetooth Gatt ?, Ġstatus : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ ĠLog Helper . print It (" on Services Dis covered ") ĊĠĠĠĠĠĠĠ Ġble Gatt Activity . show Services ( g att ?. services Ġ?: ĠLinkedList ()) ĊĠĠĠĠĠĠĠ ĠTODO (" g att . services Ġis Ġempty ") ĊĠĠĠ Ġ} Ċ }