Skip to content

Commit a061d9e

Browse files
committed
Adjusted heading levels
1 parent d9f60ec commit a061d9e

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,31 @@ Replace `master-SNAPSHOT` with the a release version number or a commit hash to
2626

2727
### Overview
2828

29-
This library provides all commonly used Bluetooth GATT server functionality through [RxJava][rxjava] powered interfaces. There's a default implementation avaialble for each of those interfaces, so that you don't have to manually deal with all the request and response handling that is usually required when providing Android's `BluetoothGattServerCallback`.
29+
This library provides all commonly used Bluetooth GATT server functionality through [RxJava][rxjava] powered interfaces. There's a default implementation available for each of those interfaces, so that you don't have to manually deal with all the request and response handling that is usually required when providing Android's `BluetoothGattServerCallback`.
3030

3131
It also introduces a few wrappers to make it more convenient to work with the BLE related stuff, for instance:
3232

3333
- `RxBleValue` instead of raw `byte[]` arrays with offsets
3434
- `RxBleServerRequest` and `RxBleServerResponse` instead of the overloaded callback parameters
3535
- Further extended for characteristic and descriptor reads and writes
3636

37-
### Usage
38-
39-
#### GATT Server
37+
### GATT Server
4038

4139
The `RxBleServer` interface provides the functionality of Android's `BluetoothGattServer`. It's capable of providing and advertising services as well as connecting and disconnecting clients.
4240

4341
To get an instance of the default implementation, use the `ServerBuilder`.
4442

4543
You can customize the default implementation by extending `BaseServer`.
4644

47-
##### Providing & Advertising
45+
#### Providing & Advertising
4846

49-
To actually open the server and make it visible to remote clients, there are two methods that you should subscribe to: `Completable provideServices()` and `Completable advertise(UUID)`.
47+
To actually open the server and make it visible to remote clients, there are two methods that you should subscribe to: `provideServices()` and `advertise(UUID)`.
5048

51-
You can provide a GATT server without advertising any service UUID. You can also advertise a service UUID that you don't actually provide a GATT server for. While most of the time you might want to do both, that may not always be the case. You could, for instance, stop advertising while a given client is connected. For convenience, there's also a merged version: `Completable provideServicesAndAdvertise(UUID)`.
49+
You can provide a GATT server without advertising any service UUID. You can also advertise a service UUID that you don't actually provide a GATT server for. While most of the time you might want to do both, that may not always be the case. You could, for instance, stop advertising while a given client is connected. For convenience, there's also a merged version: `provideServicesAndAdvertise(UUID)`.
5250

5351
These methods will return a `Completable` that never terminates (unless an error accurs, e.g. when Bluetooth is disabled). You need to manually dispose the `Completable` subscriptions to stop the server (e.g. when your application lifecycle comes to an end).
5452

55-
#### GATT Services
53+
### GATT Services
5654

5755
The `RxBleService` interface provides the functionality of Android's `BluetoothGattService`. It's basically just a container for one ore more characteristics.
5856

@@ -68,7 +66,7 @@ RxBleService service = new ServiceBuilder(EXAMPLE_SERVICE_UUID)
6866

6967
You can customize the default implementation by extending `BaseService`.
7068

71-
#### GATT Characteristics
69+
### GATT Characteristics
7270

7371
The `RxBleCharacteristic` interface provides the functionality of Android's `BluetoothGattCharacteristic`. It can hold a value, zero or more descriptors, permissions and properties.
7472

@@ -88,7 +86,7 @@ RxBleCharacteristic characteristic = new CharacteristicBuilder(EXAMPLE_CHARACTER
8886

8987
You can customize the default implementation by extending `BaseCharacteristic`.
9088

91-
#### GATT Descriptors
89+
### GATT Descriptors
9290

9391
The `RxBleDescriptor` interface provides the functionality of Android's `BluetoothGattDescriptor`. It can hold a value and permissions.
9492

@@ -109,7 +107,7 @@ RxBleDescriptor descriptor = new CharacteristicUserDescription("Example characte
109107

110108
You can customize the default implementation by extending `BaseDescriptor`.
111109

112-
#### Value Providers
110+
### Value Providers
113111

114112
Both `RxBleCharacteristic` and `RxBleDescriptor` extend the `RxBleSharedValueProvider` as well as the `RxBleClientValueProvider` interface. That means they have methods to get or set values, and to observe value changes (e.g. if set by a write request from a remote client).
115113

@@ -127,7 +125,7 @@ valueProvider.getValueChanges(someClientOfInterest)
127125

128126
Note that the difference between these two is not just a `.filter()` by device, different clients can actually read and write different values on the same `RxBleClientValueProvider`.
129127

130-
#### Clients
128+
### Clients
131129

132130
The `RxBleClient` interface provides the functionality of Android's `BluetoothDevice`. It represents a remote device that connected to the server. Client instances will be automatically created by the library for your once they start connecting.
133131

0 commit comments

Comments
 (0)