| | |
| | | package com.hdl.photovoltaic.ui; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.annotation.Nullable; |
| | | import androidx.appcompat.content.res.AppCompatResources; |
| | | |
| | | import android.Manifest; |
| | | import android.content.ComponentName; |
| | | import android.content.Intent; |
| | | import android.content.ServiceConnection; |
| | | import android.content.pm.PackageManager; |
| | | import android.os.Bundle; |
| | |
| | | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | setNotificationBarBackgroundColor(CustomColor.blue); |
| | | //初始化 |
| | | initView(); |
| | | //初始化界面监听器 |
| | |
| | | } else if (event.getTopic().contains(HdlOtaLogic.localDownloadProgress)) { |
| | | //下载云端驱动或者固件文件,自己计算进度条上报到uni那边 |
| | | HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean(); |
| | | uniCallBackBaseBean.setType(HdlOtaLogic.localDownloadProgress); |
| | | uniCallBackBaseBean.setType(event.getType()); |
| | | uniCallBackBaseBean.setData(event.getData()); |
| | | HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_REPLY_OTA_MODEL, uniCallBackBaseBean); |
| | | HdlLogLogic.print(((HdlOtaLogic.Progress) event.getData()).step + "", false); |
| | | HdlLogLogic.print("进度:" + ((HdlOtaLogic.Progress) event.getData()).step + "", false); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | void dowlao() { |
| | | |
| | | HdlOtaLogic.getInstance().getDeviceDriverDownloadFile("http://hdl-hz-test.oss-cn-hangzhou.aliyuncs.com/20/2023/11/1834a1d0-d2a7-4b6f-9877-6f2722e9b7bc.hdlipk_sec", new CloudCallBeak<ResponseBody>() { |
| | | HdlOtaLogic.getInstance().getDeviceUpgradeDownloadFile("http://hdl-hz-test.oss-cn-hangzhou.aliyuncs.com/20/2023/11/1834a1d0-d2a7-4b6f-9877-6f2722e9b7bc.hdlipk_sec", new CloudCallBeak<ResponseBody>() { |
| | | @Override |
| | | public void onSuccess(ResponseBody responseBody) { |
| | | String drivePathFileName = HdlFileLogic.getInstance().getDrivePathFileName("036F6C1B", "V01.01.02"); |