转为java语言:if(!MeshServer.getInstance().isConnected){ showToast("未连接蓝牙设备") return } if(nodeAddress==null || nodeAddress!!<0){ LogTool.d("node address is null or negative") return } if(imageInfo==null){ showToast("请先获取硬件信息") return } if(updateFile==null){ showToast("请先选择升级文件") return }
时间: 2023-06-27 17:07:30 浏览: 264
if (!MeshServer.getInstance().isConnected) {
showToast("未连接蓝牙设备");
return;
}
if (nodeAddress == null || nodeAddress < 0) {
LogTool.d("node address is null or negative");
return;
}
if (imageInfo == null) {
showToast("请先获取硬件信息");
return;
}
if (updateFile == null) {
showToast("请先选择升级文件");
return;
}
相关问题
把这段转为Java:MeshServer.getInstance().startOTAUpdate(nodeAddress!!,imageInfo,updateFile,object :IOTAUpdateProgress{ override fun onUpdateStart() { resetSpeedCount() it.onNext("start update!") }
MeshServer.getInstance().startOTAUpdate(nodeAddress!!, imageInfo, updateFile, new IOTAUpdateProgress() {
@Override
public void onUpdateStart() {
resetSpeedCount();
it.onNext("start update!");
}
});
阅读全文