From 845bb16392e6b47ec31147d0e7c6ddc39537f2e7 Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期三, 16 二月 2022 13:05:21 +0800 Subject: [PATCH] 解密有问题后不往上层发 --- HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 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 0c7d606..aed7414 100644 --- a/HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java +++ b/HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java @@ -71,7 +71,10 @@ super.onDestroy(); removeAllTopicsListener(); } - +void init(){ + HDLLinkConfig.getInstance().setLocalSecret("7d04c4e3c2b7d600"); + HDLLinkConfig.getInstance().setGatewayId("1473119283609321473"); +} @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -80,7 +83,7 @@ tv = findViewById(R.id.state_tv); rv = findViewById(R.id.rv); rv.setLayoutManager(new LinearLayoutManager(this)); - + init(); checkIfCertified(); initDeviceInfo(); registerAllTopicsListener(); @@ -281,7 +284,7 @@ String macStr = "AA000000000000BB";//璁惧鍞竴MAC鍦板潃 String secret = "87ae414b7a853f65";//閫氳繃spk鍜宮ac鎻愪氦浜戠璁よ瘉鍚庡垎閰嶇殑secret - //姝e紡鏈嶅姟鍣� +// //姝e紡鏈嶅姟鍣� // String spkStr = "screen.mirror";//浜у搧spk // String macStr = "AA000000000000AC";//璁惧鍞竴MAC鍦板潃 // String secret = "ee62124c151b737c";//閫氳繃spk鍜宮ac鎻愪氦浜戠璁よ瘉鍚庡垎閰嶇殑secret @@ -309,13 +312,14 @@ infoBean.setDeviceModel("HDL");// infoBean.setAccessMode("WIFI"); infoBean.setIPGateway("192.168.88.1"); - infoBean.setIPAddress(IpUtils.getIP(this)); + infoBean.setIPAddress(IpUtils.getIP(this));//鏍规嵁鐪熷疄鐨処P鍦板潃濉啓 infoBean.setOID("010105000000FE08"); infoBean.setSid("010105000000FE08110100000000"); + infoBean.setHw_version("1.0"); + infoBean.setFw_version("1.0"); // infoBean.set - AuthenticateRequest.VersionBean[] versionBeans = new AuthenticateRequest.VersionBean[]{new AuthenticateRequest.VersionBean("FW", versionString), new AuthenticateRequest.VersionBean("HW", "1956F")}; - infoBean.setVersions(versionBeans); + AuthenticateRequest request = new AuthenticateRequest(IdUtils.getUUId(), time, infoBean, authbean); HDLLink.getInstance().startAuthenticateRequest(request, new HDLLinkCallBack() { @Override -- Gitblit v1.8.0