我开发了用于沟通BLE的演示应用程序。现在我可以用BLE读写数据了。当我读取数据的某些时候,我得到字符串一段时间,我得到这样的数据 final byte[] data = characteristic.getValue();
try {
if (data != null && data.length > 0) {
String messageString = new String(data, "UTF-8");
Log.v("MessageString", messageString);
intent.putExtra(EXTRA_DATA, new String(data) + "\n" + messageString);
}
}catch (Exception e)
{
e.printStackTrace();
}
$modulare = $this->Database->prepare("
SELECT id, titel, sorting, kuerzel
FROM cc_produkte
WHERE veroeffentlichen = 1
AND kuerzel = ? // Here commas have to be filtered
ORDER BY sorting, id ASC
")
->execute($pid);