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
2 answers

What is the purpose of using a PublishSubject to trigger a disconnect rather than just unsubscribing from a Subscription in RxAndroid?

I'm working on a bluetooth project that uses RxAndroidBle for bluetooth communication. I came across two different ways that the subscriptions are cleaned up. I was wondering if anyone could explain the differences and benefits of each if there are…
David Carek
  • 1,103
  • 1
  • 12
  • 26
0
votes
0 answers

Cannot connect to huawei P9 in bluetooth mode using rxandroidble

I am using the polidea library(1.4.2) successfully with a lot of devices, however, with the Huawei P9 I cannot connect at all. The piece of code I can share is the following: public Flowable connectToRobot(String address) { …
Andrei T
  • 2,985
  • 3
  • 21
  • 28
0
votes
1 answer

Issue when using RxBleClient for scanning BLE devices which are in the background

I am scanning BLE devices which are created by iOS device. Then I connect to specific service and read specific characteristic. It works perfect when iOS app which has GATT service is in the foreground. But when hide iOS server app, Android client…
Alex
  • 130
  • 11
0
votes
1 answer

Are there issues with caching / reusing a RxBleDevice instance?

RxBleClient#scanBleDevices emits a sequence of ScanResult objects. In turn, ScanResult#getBleDevice provides the RxBleDevice instance from one of these emitted item. Are there any issues with caching a RxBleDevice instance to avoid having to…
Steve Yohanan
  • 757
  • 5
  • 17
0
votes
1 answer

Lower speed on multiple writes

I want to do multiple writes using a timer. I am trying to do the following: When I do a write I want to recieve the response (OnWriteSuccess) and when I get it, I will write again. The first ten - twenty writes are ok but after that, I have a delay…
Nega developer
  • 259
  • 3
  • 8
  • 19
0
votes
0 answers

Support for multiple devices in rxandroidble?

If I have multiple, identical, but uniquely named BLE peripheral devices, can this library be made to support that? So, for example if the peripheral devices were heart rate monitors for a basketball team, could this code be used to support multiple…
user443654
  • 821
  • 1
  • 7
  • 21
0
votes
1 answer

How to get larger MTU in RxAndroidBle?

I'm trying to create data transmission between a custom BLE peripheral and Android communication library implemented with RxAndroidBle (1.4.1). I have it working with the default MTU (23 bytes) so that Android transmits only 20 bytes at the time.…
PetriL
  • 1,211
  • 1
  • 7
  • 11
0
votes
0 answers

Scan devices while being connected -> stopping the scan closes the connection

I'm using RxAndroidBle library v 1.4.1. I'd like to scan every few seconds while being connected to a device. The problem is that when I stop the scan (I do not want to scan all the time, just every few seconds) it closes the connection to the…
malinjir
  • 1,475
  • 2
  • 12
  • 17
0
votes
2 answers

What is the proper way to write multiple characteristics with RxAndroidBle?

I'm new to Rx and still trying to figure out how to properly handle observables. I was wondering if there is a better way to write multiple characteristics than to do them one at a time with RxAndroidBle? Currently I'm doing them one at a time with…
David Carek
  • 1,103
  • 1
  • 12
  • 26
0
votes
2 answers

How to update view after data received from subscribe on an observable?

I'm using RxAndroidBle for a project and I need to read some characteristics off of a ble device and then display them on screen. The code below works except for this::displayCharacteristics private void readCharacteristics() { …
David Carek
  • 1,103
  • 1
  • 12
  • 26
0
votes
1 answer

How to pause execution of back button until subscription completes?

I'm running into tons of problems using RxAndroidBle when events like back button press happen and I was wondering what the best way to pause execution of the back button is. I basically want to create a lock until a particular bluetooth operation…
David Carek
  • 1,103
  • 1
  • 12
  • 26
0
votes
1 answer

RxBleConnection with PublishSubject not releasing connection

My app effectively has a queue of BLE operations to perform with my peripheral. Each operation begins by establishing a connection to the peripheral, which returns Observable. The first item in the queue initiates the connection,…
Steve Yohanan
  • 757
  • 5
  • 17
0
votes
1 answer

Application is not able to capture each and every scan responses from the ble device

I am developing a BLE android application where I have used RxAndroidBLe for BLE communication. Everything working fine except one issue that the application is not receiving every scan response broadcasted by the BLE device (I am not sure whether…
sanjay
  • 626
  • 1
  • 7
  • 12
0
votes
1 answer

RxAndroidBle with java 7

I am trying to use RxAndroidBle to scan for devices. All the examples I found seem to use java lambda expression. Do I need java 8 with android studio to use the RxAndroidBle library? How can I run the below code with out lamda…
amanda45
  • 535
  • 10
  • 29
0
votes
1 answer

Android Ble client app architecture

it's more a general question rather than a specific one. Basically I'm developing an Android app which communicates with Ble Peripheral Device. I handle Ble communication using RxAndroidBle library. As for the general pattern, I decided to try Mosby…
Jogosb
  • 155
  • 1
  • 12