Skip to content

蓝牙搜索到,但不显示-三星S7 #4

@Luhangh

Description

@Luhangh

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)) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions