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

RxAndroidBle - Different results when using CALLBACK_TYPE_ALL_MATCHES or CALLBACK_TYPE_FIRST_MATCH

I'm not able to find my ble device when using CALLBACK_TYPE_ALL_MATCHES parameter, but when I change this parameter by CALLBACK_TYPE_FIRST_MATCH the result is as expected. Unfortunately, CALLBACK_TYPE_FIRST_MATCH doesn't work with several…
0
votes
1 answer

Writing multiple commands to characteristic

I am just discovering rxandroidble and can reliably send a single command to the BLE device after connection However I am struggling to find the best way to write a chain of commands, ie if I have a series of 3 commands that need to be sent Of…
Joel Spencer
  • 129
  • 1
  • 8
0
votes
1 answer

RxAndroidBle2 working differently in scanning and connecting across Android phone models

First of all, thanks to Polidea for the excellent ReactiveX based library for Android BLE (RxAndroidBle2)! As I came across the library, I have replaced my BLE usage in my Android app completely with RxAndroidBle, and this took away a lot of…
0
votes
3 answers

Any way to monitor discovered BLE peripherals without connecting?

Is there any way of being notified if a discovered BLE peripheral moves out of range or otherwise drops out of sight? I'm using rxBleClient.scanBleDevices() to build a list of devices in the area that are advertising, but before shipping this list…
Robert Lewis
  • 1,847
  • 2
  • 18
  • 43
0
votes
1 answer

How to check battery removed using rxandroidble

I want to get status 8 or battery removed using RxAndroidBle. I'm using this to get…
0
votes
1 answer

RxAndroidBle waiting for client response

I'm in the process of converting a pure Android BLE library to using RxAndroidBle and I'm hitting a bit of a snag. The library currently opens the connection, reads a characteristic, and checks to see if it's encrypted. If it is, it goes on to read…
N. Smith
  • 225
  • 1
  • 8
0
votes
0 answers

rxAndroidBle scan does not show any devices

I downloaded the 1.5.0-rxjava2 release from github. Added the following in the manifest file:
frodyteen
  • 19
  • 6
0
votes
1 answer

Location Services disabled on Android Things

When attempting to run the BLE Indoor Positioning Demo App on Android Things (using the NXP i.MX7D Developer Kit), I get Bluetooth scanning error: Location Services disabled (code 4). E/BluetoothClient: Bluetooth scanning error: Location Services…
Steppschuh
  • 329
  • 1
  • 5
  • 14
0
votes
1 answer

Unable to connect Android to a specific BLE device

I'm maintaining a legacy Android app that retrieves data from several BLE peripherals. Trying to add support for a new peripheral, I find the app won't connect to it. The basic problem seems to be that when it calls .connectGatt() I immediately get…
Robert Lewis
  • 1,847
  • 2
  • 18
  • 43
0
votes
0 answers

RxAndroidBle can connect to peripheral but standard Android can't

Hoping that the experts might have a tip: I've inherited some code that uses the Android BLE API. It works OK with most devices, but will not connect to one, a blood pressure monitor. I wrote a quick test app using RxAndroidBle that connects fine as…
Robert Lewis
  • 1,847
  • 2
  • 18
  • 43
0
votes
3 answers

Observe many times from same Observable (RxAndroidBle)

I'm using the RxAndroidBle library with RxJava2 to read from a BLE Characteristic. I think this question is just an RxJava question, but including the detail that I'm using RxAndroidBle in case that is useful. I get connection, and then use it to…
Sky Kelsey
  • 19,192
  • 5
  • 36
  • 77
0
votes
1 answer

How to respond to BLE characteristic notifications by sending a new write command

I'm updating an app to use RxAndroidBLE, and struggling with how to translate my existing callback pattern into an Rx pattern. In particular, I need to respond to characteristic notifications in different ways depending on the received data, and…
Peter
  • 540
  • 3
  • 12
0
votes
0 answers

Why can't my library module find an import?

I'm attempting to add a library module to an existing Android app. Both modules have this in the dependencies section of their build.gradle: api "com.polidea.rxandroidble2:rxandroidble:1.5.0" Both have this import statement in the code: import…
Robert Lewis
  • 1,847
  • 2
  • 18
  • 43
0
votes
1 answer

Android oreo ble connection in background

I need hold ble connection forever. How I can do it for android Oreo with out foreground service ? I need restore application if it was killed of OS. And start application after rebooting . I need every time searching for device and trying to…
0
votes
3 answers

Confused about Observable vs. Single in functions like readCharacteristic()

In the RxJava2 version of RxAndroidBle, the functions readCharacteristic() and writeCharacteristic() return Single. The example code to read a characteristic is: device.establishConnection(false).flatMap(rxBleConnection ->…
Robert Lewis
  • 1,847
  • 2
  • 18
  • 43