douglasjunior / AndroidBluetoothLibrary

A Library for easy implementation of Serial Bluetooth Classic and Low Energy on Android. 💙
MIT License
224 stars 68 forks source link

Reading on demand. #20

Closed m-slavov closed 5 years ago

m-slavov commented 6 years ago

Hello, sorry if this is a stupid question but I was wondering if there is a way to read from a peripheral device on demand, like for example when I press a button or something else? As far as I understand you can read when a device writes to you, but I was still wondering if there is another way to read. Thank you in advance.

douglasjunior commented 6 years ago

The remote device needs to write something for you to read.

You can write something to the remote device, and then the remote device read the message and writes something back.

ederdoski commented 6 years ago

Hello, If I wanted to read on demand, would not there be any solution that does not include writing to the device?

jjrodcast commented 6 years ago

@ederdoski you mean that you want to read when you fires an action? If that's the case I think you have to send the corresponding data to other devices.

ederdoski commented 6 years ago

Yes, what I need is to manually read a feature, but I do not know how to do it, do you know?

jjrodcast commented 6 years ago

@ederdoski it is simple, when you want to read data there is an interface where you can read the bytes the same if you want to send data to other device.