Android: BLE how to read multiple Characteristics?

前端 未结 3 790
予麋鹿
予麋鹿 2020-12-05 01:24

Android BLE API methods for reading some characteristics are Asynchronous in nature and when you request some value, your GATT callback method is called.

If you requ

3条回答
  •  天涯浪人
    2020-12-05 01:34

    You might have discovered it yourself already, but it might be useful for others.

    I didn't understand if that so why they made methods Async.

    They probably did it because sending a read-request to another device in synchronous execution would mean you cannot do anything with your app until an answer is received. By making it Async you can do other stuff, but no other bluetooth requests.

提交回复
热议问题