startLeScan with 128 bit UUIDs doesn’t work on native Android BLE implementation
@Navin’s code is good, but it includes an overflow bug from the original 16-bit Android code. (If either byte is larger than 127 then it becomes a negative integer.) Here’s an implementation which fixes that bug and adds 128-bit support: private List<UUID> parseUuids(byte[] advertisedData) { List<UUID> uuids = new ArrayList<UUID>(); ByteBuffer buffer = ByteBuffer.wrap(advertisedData).order(ByteOrder.LITTLE_ENDIAN); while … Read more