I searched the source code for android 22 to change my code to a new BLE scan and came across a ScanRecord class. When I opened the source code for ScanRecord (sources / android-22 / android / bluetooth / le / ScanRecord.java), I saw that the parseFromBytes function exists:
/** * 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)
But if I try to use it in my code, he will not be able to find this function. Also, if I check the API here , the function is not mentioned at all.
I am using Android Studio 1.3.1 with compileSdkVersion 22, minSdkVersion 18, targetSdkVersion 22 and buildToolsVersion 22.0.1
What am I missing? Why can't I use this function, although it is part of the Android source code?
Thanks for clarifying.
source share