我在我的项目中使用了android.bluetooth包,但我尝试实现IBluetoothGatt的读写特性。但我有一个像下面IBluetoothGatt接口 public final class BluetoothGatt implements BluetoothProfile {
private static final String TAG = "BluetoothGatt";
我试图从两个BLE特征值中检索数据。它们都包含结构,我也希望将这些数据作为结构保存在我的应用程序中。来自第一个BLE特征的数据全部是Int16,我可以保存它。但问题是,第二个特征包含Int8 & Int16,我找不到解决方案。 在我的应用程序中,我为这两个特性创建了两个不同的结构。第一个结构看起来像这样,都是Int16。 struct FirstStruct {
let a1: Int