Questions tagged [rxandroidble]

RxAndroidBle is a library wrapping the native Android Bluetooth Low Energy (BLE) API based on RxJava. Use this tag when asking questions related to usage of the RxAndroidBle library.

RxAndroidBle is a powerful painkiller for Android's Bluetooth Low Energy headaches. It is backed by RxJava, implementing complicated APIs as handy reactive observables.

Features:

  • Fancy asynchronous operations support (read, write, notifications)
  • Threading management in order to meet Android contracts
  • Connection and operation error handling

See also:

268 questions
0
votes
1 answer

How do i set WRITE_TYPE_NO_RESPONSE for writeCharacteristic for rxandroidble

Here is my code.I can't find a way to set it. device.establishConnection(false).timeout(1000, TimeUnit.MILLISECONDS).retry(3) .flatMap(rxBleConnection -> …
ericlee
  • 2,703
  • 11
  • 43
  • 68
0
votes
2 answers

How to unsubscribe after a successful writeCharacteristic with rxandroidble

My current code is as shown below. I am wondering how do i unsubscribe (disconnect the ble) after writeCharacteristic? Also, is there a way to reconnect on writeCharacteristic fail? Subscription subscription = device.establishConnection(false) …
ericlee
  • 2,703
  • 11
  • 43
  • 68
0
votes
1 answer

Unsubscribe notification

With the help of a button, the user can receive notifications of a characteristic. The following code will be executed: connection.setupNotification(setDescriptorEnableNotification(tmpCharacterostoc, connection)) .flatMap(notificationObservable ->…
Christian
  • 1
  • 1
0
votes
1 answer

What is the status of rxandroidble and rxjava2?

I just inherited a project which uses both rxandroidble and rxjava2 (and the associated rxandroid). The previous developer seems to have gotten away with using them together with the versions being just so... But updating any of the related…
Martin Westin
  • 1,419
  • 1
  • 14
  • 25
0
votes
2 answers

Get Subscription from Already Connected Device Using RxAndroidBle

Is there a way to get a Subscription from an already connected device using RxAndroidBle? I can't seem to find a way aside from disconnecting and connecting again.
lorenzo
  • 494
  • 6
  • 23
0
votes
1 answer

GATT 137 exception when read characteristic

I'm using RxAndroidBle library for connecting bluetotooth device. I'm getting GATT 137 exception when I read characteristic of bluetooth device. Why I can't read characteristic ? Code snippet: if (device.connectionState ==…
yusufonderd
  • 3,237
  • 4
  • 21
  • 34
0
votes
1 answer

Preserving Ble Connection throughout the whole app using RxAndroidBle library

I am working on a BLE app (using RxAndroidBle library!) that is able to connect to multiple devices for quite a while. Recently business requirements have slightly changed and I have to preserve connection with all the devices throughout whole…
Jogosb
  • 155
  • 1
  • 12
0
votes
3 answers

rxandroidble write only sends the first 20B

I try to write >20 bytes data on a given (custom) characteristic. In the following log, I tried to write 85 bytes: code: connectionObservable .flatMap(rxBleConnection -> rxBleConnection.writeCharacteristic( …
yacine
  • 13
  • 5
0
votes
1 answer

Need to write multiple commands on device 1 by 1

Its taking too long to write a single command on characteristics. I am using below code for a single command and a loop on it. getConnObservable() .first() .flatMap(rxBleConnection -> rxBleConnection.writeCharacteristic(characteristics,…
Usman Afzal
  • 558
  • 1
  • 6
  • 13
0
votes
0 answers

Running Observables in a Service

I have set up an RxAndroidBle Observable/Subscriber to receive and log data from several Bluetooth LE peripherals. It is inside an Android Service, which currently is of the Bound variety (to 2 different Activities). I was planning to add the…
Robert Lewis
  • 1,847
  • 2
  • 18
  • 43
0
votes
1 answer

RxAndroidBLE multiple connections issue

Using RxAndroidBLE Library. Specifications : macOS Sierra Version 10.12.6, Android studio 3.0.1, hand set model :Moto E, Android version 5.0.2 Getting below BleDisconnectedException issue when i tried to connect to 2 BLE devices, please suggest: On…
Molay
  • 1,154
  • 2
  • 19
  • 42
0
votes
1 answer

Leaked intent receiver rxAndroidble UPDATED

I noticed that in the compose method this observable could be binded to an activity lifecycle to do the desired unsubscription, the problem is that i am doing this in a service, so i cant use this library, or at least i dont know how to get this…
0
votes
1 answer

OnNext not being called on observable when using combineLatest and take

I'm trying to get a subscription to automatically unsubscribe when it emits an item. The base observable is created like this. public static Observable setupConnection(RxBleDevice device, PublishSubject disconnectTrigger) { …
David Carek
  • 1,103
  • 1
  • 12
  • 26
0
votes
1 answer

Read multiple characteristics from an Android device using library RxAndroidBle

I am using the library RxAndroidBle in order to scan devices and then connect to one specific device and read 4 GATT characteristics. I can read one characteristic (Battery Level) ith this code : scanSubscription = rxBleClient.scanBleDevices( …
yozzy
  • 344
  • 2
  • 15
0
votes
1 answer

What is the point of making RxBleClient non-static?

In the RxAndroidBle sample application, the Application class is: public class SampleApplication extends Application private RxBleClient rxBleClient; /** * In practise you will use some kind of dependency injection pattern. */ …
Robert Lewis
  • 1,847
  • 2
  • 18
  • 43