package Ġio . blue trace . op entr ace . bluetooth . g att Ċ Ċ import Ġandroid . bluetooth . Bluetooth GattCharacteristic Ċ import Ġandroid . bluetooth . Bluetooth Gatt Service Ċ import Ġandroid . content . Context Ċ import Ġio . blue trace . op entr ace . Build Config Ċ import Ġjava . util .* Ċ import Ġkotlin . properties . Deleg ates Ċ Ċ class ĠG att Service Ġconstructor ( val Ġcontext : ĠContext , Ġservice UUID String : ĠString ) Ġ{ ĊĊĠĠĠ Ġprivate Ġvar Ġservice UUID Ġ= ĠUUID . fromString ( service UUID String ) ĊĊĠĠĠ Ġvar Ġg att Service : ĠBluetooth Gatt Service Ġby ĠDeleg ates . notNull () ĊĊĠĠĠ Ġprivate Ġvar Ġcharacteristic V 2 : ĠBluetooth GattCharacteristic ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġg att Service Ġ= ĠBluetooth Gatt Service ( service UUID , ĠBluetooth Gatt Service . SERVICE _ TYPE _ PRIMARY ) ĊĠĠĠĠĠĠĠ Ġcharacteristic V 2 Ġ= ĠBluetooth GattCharacteristic ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠUUID . fromString ( Build Config . V 2 _ CHARACTER ISTIC _ ID ), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠBluetooth GattCharacteristic . PROPERTY _ READ Ġor ĠBluetooth GattCharacteristic . PROPERTY _ WRITE , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠBluetooth GattCharacteristic . PERMISSION _ READ Ġor ĠBluetooth GattCharacteristic . PERMISSION _ WRITE ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġg att Service . add Characteristic ( character istic V 2 ) ĊĠĠĠ Ġ} Ċ } Ċ