Android-ble icon indicating copy to clipboard operation
Android-ble copied to clipboard

Android蓝牙4.0操作demo

Results 4 Android-ble issues
Sort by recently updated
recently updated
newest added

在DeviceScanActivity.java里面用到的 if(!TextUtils.isEmpty(name) && "CardioChek Meter:".contains(name)) { mLeDeviceListAdapter.addDevice(device); mLeDeviceListAdapter.notifyDataSetChanged(); } 报找不到符号的错误,搜了好久不知道为什么。

界面是空白的 menu item 点击也没用 小米6

String struuid = bytes2HexString(reverseBytes(scanRecord)).replace("-", "").toLowerCase();; Log.d(TAG, "run: "+struuid); String name = device.getName(); Log.d(TAG, "run:sring **"+name); if(!TextUtils.isEmpty(name) && "CardioChek Meter:".contains(name)) { mLeDeviceListAdapter.addDevice(device); mLeDeviceListAdapter.notifyDataSetChanged(); } 请问下上述device.getName()为空,是什么情况 ,device本身是有数据,加这一层校验就过不去 if(!TextUtils.isEmpty(name) && "CardioChek Meter:".contains(name)) {