Skip to content

Commit ab4c896

Browse files
committed
还原蓝牙广播的原始数据
1 parent 63a1002 commit ab4c896

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

android/src/main/java/com/pauldemarco/flutter_blue/ProtoMaker.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ static Protos.ScanResult from(BluetoothDevice device, ScanResult scanResult) {
6767
a.setTxPowerLevel(Protos.Int32Value.newBuilder().setValue(txPower));
6868
}
6969
// Manufacturer Specific Data
70-
SparseArray<byte[]> msd = scanRecord.getManufacturerSpecificData();
70+
// SparseArray<byte[]> msd = scanRecord.getManufacturerSpecificData();
71+
// 返回广播的原始数据
72+
SparseArray<byte[]> msd = new SparseArray<byte[]>();
73+
msd.append(0, scanRecord.getBytes());
7174
for (int i = 0; i < msd.size(); i++) {
7275
int key = msd.keyAt(i);
7376
byte[] value = msd.valueAt(i);

0 commit comments

Comments
 (0)