Skip to content

Commit

Permalink
Release 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
uKL committed Mar 14, 2018
1 parent 506d98c commit 5c2120a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Be careful not to overuse the autoConnect flag. On the other side it has negativ
#### Read
```java
device.establishConnection(false)
.flatMap(rxBleConnection -> rxBleConnection.readCharacteristic(characteristicUUID))
.flatMapSingle(rxBleConnection -> rxBleConnection.readCharacteristic(characteristicUUID))
.subscribe(
characteristicValue -> {
// Read characteristic value.
Expand All @@ -168,7 +168,7 @@ device.establishConnection(false)
#### Write
```java
device.establishConnection(false)
.flatMap(rxBleConnection -> rxBleConnection.writeCharacteristic(characteristicUUID, bytesToWrite))
.flatMapSingle(rxBleConnection -> rxBleConnection.writeCharacteristic(characteristicUUID, bytesToWrite))
.subscribe(
characteristicValue -> {
// Characteristic value confirmed.
Expand All @@ -181,7 +181,7 @@ device.establishConnection(false)
#### Multiple reads
```java
device.establishConnection(false)
.flatMap(rxBleConnection -> Observable.combineLatest(
.flatMap(rxBleConnection -> Single.zip(
rxBleConnection.readCharacteristic(firstUUID),
rxBleConnection.readCharacteristic(secondUUID),
YourModelCombiningTwoValues::new
Expand All @@ -202,6 +202,7 @@ device.establishConnection(false)
.setCharacteristicUuid(uuid) // required or the .setCharacteristic()
// .setCharacteristic() alternative if you have a specific BluetoothGattCharacteristic
.setBytes(byteArray)
// .setWriteOperationRetryStrategy(retryStrategy) // if you'd like to retry batch write operations on failure, provide your own retry strategy
// .setMaxBatchSize(maxBatchSize) // optional -> default 20 or current MTU
// .setWriteOperationAckStrategy(ackStrategy) // optional to postpone writing next batch
.build()
Expand All @@ -219,7 +220,7 @@ device.establishConnection(false)

```java
device.establishConnection(false)
.flatMap(rxBleConnection -> rxBleConnection.readCharacteristic(characteristicUuid)
.flatMapSingle(rxBleConnection -> rxBleConnection.readCharacteristic(characteristicUuid)
.doOnNext(bytes -> {
// Process read data.
})
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
classpath 'org.codehaus.groovy:groovy-android-gradle-plugin:2.0.0'
}
}
Expand Down
6 changes: 3 additions & 3 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
ext {
supportVersion = '27.0.2'
rxJavaVersion = '2.1.9'
rxJavaVersion = '2.1.10'
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7
shadowPluginVersion = '2.0.2'
daggerVersion = '2.14.1'
daggerVersion = '2.15'
libs = [
/* Application dependencies */
support : "com.android.support:support-v4:$supportVersion",
support_annotations: "com.android.support:support-annotations:$supportVersion",
rxjava : "io.reactivex.rxjava2:rxjava:$rxJavaVersion",
rxandroid : 'io.reactivex.rxjava2:rxandroid:2.0.1',
rxandroid : 'io.reactivex.rxjava2:rxandroid:2.0.2',
rxrelay : 'com.jakewharton.rxrelay2:rxrelay:2.0.0',
junit : 'junit:junit:4.12',
groovy : 'org.codehaus.groovy:groovy:2.4.12:grooid',
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.polidea.rxandroidble2
VERSION_NAME=1.5.0-SNAPSHOT
VERSION_NAME=1.5.0

POM_DESCRIPTION=RxJava backed support for Bluetooth Low Energy in Android

Expand Down

0 comments on commit 5c2120a

Please sign in to comment.