Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get a list of connected devices + observe when they connect #718

Open
nrbrook opened this issue Sep 6, 2020 · 1 comment
Open

Get a list of connected devices + observe when they connect #718

nrbrook opened this issue Sep 6, 2020 · 1 comment

Comments

@nrbrook
Copy link
Contributor

nrbrook commented Sep 6, 2020

When Android automatically reconnects to previously connected devices, as far as I know there is no way to be notified about that through RxAndroidBle, and no way to get a list of connected devices. You can obtain a list of bonded devices, but Android will also reconnect to devices that aren't bonded.

Describe the solution you'd like
Be able to observe new device connections and also obtain a list of currently connected devices

Describe alternatives you've considered
This can be implemented externally to RxAndroidBle like this but I'm not sure if the devices found can then be wrapped in RxAndroidBle classes.

I'd be happy to work on a pull request but not really sure where to start or if I'm missing something.

@dariuszseweryn
Copy link
Owner

This can be implemented externally to RxAndroidBle like this...

To be honest — when I was experimenting with that API it turned out to be working only for classic Bluetooth profiles. You can try it yourself. AFAIR the BluetoothManager API allowed getting currently connected BLE peripherals.

... but I'm not sure if the devices found can then be wrapped in RxAndroidBle classes.

If you have a MAC address of a BLE Peripheral it is as simple as calling RxBleClient.getBleDevice(macAddress).

P.S. When I will get some continuous time for the lib I plan to start with your pending PRs. Don't loose the faith! ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants