Is the native Android BLE implementation synchronous in nature?

前端 未结 2 764
小蘑菇
小蘑菇 2020-12-01 11:03

I remember reading in the \"Guide and Hint\"-doc to the Samsung BLE API (archived page):

One of the most important concepts of the Samsung F/W and sta

相关标签:
2条回答
  • 2020-12-01 11:45

    Samsung recently published a "migration"-document on the same page I linked in my question. They exactly answer my question while comparing the new native BLE API with the Samsung BLE API:

    The synchronous nature of the stack and F/W hasn’t been affected. That is, if we call for example, writeCharacteristic for a particular characteristic, if it returns true, the next call to any BluetoothGatt or BluetoothGattServer method should be done after the onCharacteristicRead callback is received. This is because the stack is designed to support and process only one GATT call at a time, and if, for example, you call writeCharacteristic or readCharacteristic of any characteristic soon after the first one, it is ignored.

    0 讨论(0)
  • 2020-12-01 11:54
    1. No. most of the function calls are asynchronous.
    2. I don't know. Official docs doesn't mention it but it doesn't say that it supports only one device either. I believe it's possible to do it. Check this article: http://blog.lemberg.co.uk/getting-bottom-android-bluetooth-low-energy-api#.UfvK6ZK-1cY

    It says (I don't know what its source is) that multiple peripheral devices can connect to one Android Central device

    0 讨论(0)
提交回复
热议问题