HDLSDK/app/src/main/java/com/hdl/hdlsdk/App.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDLSDK_DEMO.rar | 补丁 | 查看 | 原始文档 | blame | 历史 |
HDLSDK/app/src/main/java/com/hdl/hdlsdk/App.java
@@ -30,7 +30,7 @@ //appkey:ryfElI3tVOT //appsecret:AKIn7s1A2YnNvAZRtL8FQxzp0R2KUpIY HDLLink.getInstance().initCloud(this, "ryfElI3tVOT", "AKIn7s1A2YnNvAZRtL8FQxzp0R2KUpIY", HdlCloudApi.BASE_BAHRAIN_URL); HDLLink.getInstance().initCloud(this, "Lstzip08fTl", "iSIr5TSz1Rzxc1QRQ3RgnGwGB2SeAAAA", HdlCloudApi.BASE_CHINA_URL); //注册全局广播,刷新token GlobalBroadcastManager.registerGlobalBroadcast(this); HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java
@@ -92,9 +92,9 @@ tv.setText("开始申请设备密钥..."); responseTv.setText(""); String supplier = "JINMAOYUN";//厂商 // String mac = "AA00000000000100";//设备唯一MAC地址 String mac = editText.getText().toString(); String supplier = "HIK KNX";//厂商 String mac = "FQ4895630";//设备唯一MAC地址 // String mac = editText.getText().toString(); String spk = "screen.touch";//产品spk if (TextUtils.isEmpty(mac)) { @@ -410,9 +410,13 @@ public void onMessage(Object msg) { LinkResponse response = (LinkResponse) msg; Log.i("onMessage", "response.getTopic():" + response.getTopic()); String topic = String.format(TopicConstant.GATEWAY_LOGIN, HDLLinkConfig.getInstance().getGatewayId())+ "_reply";; if ("/user/all/custom/gateway/broadcast_reply".equals(response.getTopic())) { localSecret.setText("密钥:" + HDLLinkConfig.getInstance().getLocalSecret()); }else if (topic.equals(response.getTopic())){ //tcp连接成功,处理业务逻辑 } } }; HDLSDK_DEMO.rarBinary files differ