I was looking through the source code for android 22 to change my code to the new BLE scanning and came across the ScanRecord class. When I opened the source code for ScanRecord (sources/android-22/android/bluetooth/le/ScanRecord.java) I saw that there is a function 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)
But if I try and use it in my code, it cannot find the 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 the function although it is part of the android source code?
Thanks for clarification.