private static Observable<PresenterEvent> setupReadingBehaviour(Observable<Boolean> readClicks,
                                                                    BluetoothGattCharacteristic characteristic,
                                                                    RxBleConnection connection) {
        return !hasProperty(characteristic, BluetoothGattCharacteristic.PROPERTY_READ)
                // if the characteristic is not readable return an empty (dummy) observable
                ? Observable.empty()
                : readClicks // else use the readClicks observable from the activity
                // every click is requesting a read operation from the peripheral
                .flatMapSingle(ignoredClick -> connection.readCharacteristic(characteristic))
                .compose(transformToPresenterEvent(Type.READ)); // convenience method to wrap reads
    }
Presenter class for {@link AdvancedCharacteristicOperationExampleActivity}. Prepares the logic for the activity using passed
{@link Observable}s. Contains only static methods to show a purely reactive (stateless) approach.
<p>
The contract of the class is that it subscribes to the passed Observables only if a specific functionality is possible to use.
sample/src/main/java/com/polidea/rxandroidble2/sample/example4_characteristic/advanced/Presenter.java