JLChen
2021-12-02 a03799e08e7cc9b984b89cd125fd01e31f78486d
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("读取成功");