Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
weliem committed Oct 29, 2023
2 parents 7cb80ba + 53936fe commit 07e659a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,16 @@ BLESSED provides a convenience methods `startNotify` and `stopNotify` to turn no

```kotlin
val currentTimeCharacteristic = peripheral.getCharacteristic(CTS_SERVICE_UUID, CURRENT_TIME_CHARACTERISTIC_UUID)?.let {
peripheral.startNotify(it, true);
peripheral.startNotify(it)
}
```

Or alternatively, use

```kotlin
peripheral.startNotify(CTS_SERVICE_UUID, CURRENT_TIME_CHARACTERISTIC_UUID)
```

Since this is an asynchronous operation you will receive a callback that indicates success or failure. You can use the method `isNotifying` to check if the characteristic is currently notifying or not:

```kotlin
Expand Down

0 comments on commit 07e659a

Please sign in to comment.