From a03799e08e7cc9b984b89cd125fd01e31f78486d Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期四, 02 十二月 2021 09:44:20 +0800 Subject: [PATCH] 2021-12-02 1.增加网关认证错误 --- HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java b/HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java index 4927419..33838bc 100644 --- a/HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java +++ b/HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java @@ -69,6 +69,7 @@ rv.setLayoutManager(new LinearLayoutManager(this)); checkIfCertified(); + registerAllTopicsListener(); ActivityResultLauncher<String[]> launcher = registerForActivityResult(new ActivityResultContracts.RequestMultiplePermissions(), new ActivityResultCallback<Map<String, Boolean>>() { @@ -205,7 +206,7 @@ AuthenticateRequest.AuthenticateDeviceInfoBean infoBean = new AuthenticateRequest.AuthenticateDeviceInfoBean(); infoBean.setDeviceMAC(macStr); infoBean.setIPMAC(macStr); - infoBean.setDeviceName("HDL璁惧");//璁惧鍚嶅瓧 + infoBean.setDeviceName("绾㈠瀹�");//璁惧鍚嶅瓧 infoBean.setDeviceModel("HDL");// infoBean.setAccessMode("WIFI"); infoBean.setIPGateway("192.168.10.1"); @@ -281,7 +282,7 @@ void getFunctionList(){ tv.setText("鑾峰彇鍔熻兘鍒楄〃涓�..."); responseTv.setText(""); - HDLSocket.getInstance().getFunctionList(new HDLLinkCallBack() { + HDLLink.getInstance().getFunctionList(new HDLLinkCallBack() { @Override public void onError(HDLLinkException error) { tv.setText(error.getMsg()); @@ -303,7 +304,7 @@ tv.setText("鍔熻兘灞炴�ц鍙�"); List<String> sids = new ArrayList<>(); sids.add(testLightSid); - HDLSocket.getInstance().getFunctionAttribute(sids, new HDLLinkCallBack() { + HDLLink.getInstance().getFunctionAttribute(sids, new HDLLinkCallBack() { @Override public void onSuccess(String msg) { responseTv.setText(msg); @@ -324,7 +325,7 @@ tv.setText("璇诲彇鐘舵�佷腑..."); List<String> list = new ArrayList<>(); list.add(testLightSid);//瑕佽鍙栬澶囩殑sid - HDLSocket.getInstance().propertyRead(list, new HDLLinkCallBack() { + HDLLink.getInstance().propertyRead(list, new HDLLinkCallBack() { @Override public void onSuccess(String data) { tv.setText("璇诲彇鎴愬姛"); -- Gitblit v1.8.0