I am trying to do BLE Scan on ChromeOS from my Android App. After turning on the Location Permissions I am able to get scan results. But the Manufacturer Data is not present in the results.
The Manufacturer id I have set in firmware is 0x0. I am printing the whole result object but do not see my Manufacturer Specific Data anywhere (No 0xff which is the Manu. Specific Data type)
Any one knows why this is happening?
private ScanCallback scanCallback = new ScanCallback() {
@Override
public void onScanResult(final int callbackType, final ScanResult result) {
BluetoothDevice device = result.getDevice();
int rssi = result.getRssi();
byte[] scanRecord = result.getScanRecord().getBytes();
Map<ParcelUuid, byte[]> Uuidmap = result.getScanRecord().getServiceData();
Log.i(TAG, "onScanResult- Name: " + device.getName() + " rssi: " + result.getRssi() + " Mfg data: " + Arrays.toString(result.getScanRecord().getManufacturerSpecificData(0)));
for (Map.Entry<ParcelUuid, byte[]> entry : Uuidmap.entrySet()) {
String key = entry.getKey().toString();
byte[] value = entry.getValue();
Log.i(TAG, "UUID: " + key + " Data: " + Arrays.toString(value));
}
Log.i(TAG, "Data " + Arrays.toString(scanRecord));