public interface NBleDeviceManager
| Modifier and Type | Method and Description |
|---|---|
List<NBleDevice> |
getAllDevices()
获取所有设备
|
List<NBleDevice> |
getAllDevices(boolean maintain)
获取所有设备
|
List<NBleDevice> |
getConnectedDevices()
获取所有已连接的设备
|
NBleDevice |
getDevice(String address)
根据address来获取维护的device
|
IBleNotifyFunction |
getNotification(String deviceName)
根据设备名获取notification的接口
|
boolean |
isMaintain(String address)
查询某address的设备是否是维护状态
|
void |
registerDefaultNotification(IBleNotifyFunction iFunction)
注册notification的默认处理接口
|
void |
registerNotification(String deviceName,
IBleNotifyFunction iFunction)
根据设备名注册notification的处理接口
|
void |
remove(String address)
删除设备
|
void |
setMaintain(String address,
boolean bMaintain)
设置某address的设备是否是维护状态
|
NBleDevice getDevice(String address)
List<NBleDevice> getAllDevices()
List<NBleDevice> getAllDevices(boolean maintain)
maintain - 是否是维护状态的List<NBleDevice> getConnectedDevices()
boolean isMaintain(String address)
void setMaintain(String address, boolean bMaintain)
IBleNotifyFunction getNotification(String deviceName)
void registerNotification(String deviceName, IBleNotifyFunction iFunction)
void registerDefaultNotification(IBleNotifyFunction iFunction)
void remove(String address)