小编dom*_*nik的帖子

缺少android方法:ScanRecord.parseFromBytes

我正在查看 android 22 的源代码,将我的代码更改为新的 BLE 扫描,并遇到了 ScanRecord 类。当我打开 ScanRecord 的源代码(sources/android-22/android/bluetooth/le/ScanRecord.java)时,我看到有一个函数 parseFromBytes:

/**
 * Parse scan record bytes to {@link ScanRecord}.
 * <p>
 * The format is defined in Bluetooth 4.1 specification, Volume 3, Part C, Section 11 and 18.
 * <p>
 * All numerical multi-byte entities and values shall use little-endian <strong>byte</strong>
 * order.
 *
 * @param scanRecord The scan record of Bluetooth LE advertisement and/or scan response.
 * @hide
 */
 public static ScanRecord parseFromBytes(byte[] scanRecord)
Run Code Online (Sandbox Code Playgroud)

但是如果我尝试在我的代码中使用它,它就找不到该函数。此外,如果我在这里检查 API …

android bluetooth-lowenergy

5
推荐指数
1
解决办法
2143
查看次数

标签 统计

android ×1

bluetooth-lowenergy ×1