| | |
| | | import androidx.appcompat.content.res.AppCompatResources; |
| | | |
| | | import android.Manifest; |
| | | import android.content.ComponentName; |
| | | import android.content.ServiceConnection; |
| | | import android.content.pm.PackageManager; |
| | | import android.os.Bundle; |
| | | import android.os.IBinder; |
| | | import android.os.Process; |
| | | import android.text.TextUtils; |
| | | import android.view.View; |
| | |
| | | import java.util.List; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 我的电站界面 |
| | | */ |
| | |
| | | registerAllTopicsListener(); |
| | | //初始化mqtt客户端 |
| | | initMqttClient(); |
| | | |
| | | // HdlOtaLogic.getInstance().startLocalService(new ServiceConnection() { |
| | | // @Override |
| | | // public void onServiceConnected(ComponentName name, IBinder service) { |
| | | // |
| | | // } |
| | | // |
| | | // @Override |
| | | // public void onServiceDisconnected(ComponentName name) { |
| | | // |
| | | // } |
| | | // }); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | private void initView() { |
| | | viewBinding.myPowerStationBottomIl1.titleTv.setText(R.string.power_station); |
| | | viewBinding.myPowerStationBottomIl1.titleTv.setText("首页");// |
| | | viewBinding.myMessageBottomIl2.titleTv.setText(R.string.message); |
| | | viewBinding.myMeBottomIl3.titleTv.setText(R.string.power_station_me); |
| | | this.bottomViewChangeOfStyle(); |
| | |
| | | uniCallBackBaseBean.setType(linkResponse.getTopic()); |
| | | uniCallBackBaseBean.setData(linkResponse.getData()); |
| | | HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_REPLY_OTA_MODEL, uniCallBackBaseBean); |
| | | HdlLogLogic.print( linkResponse.getTopic() + new Gson().toJson(linkResponse.getData()), true); |
| | | HdlLogLogic.print(linkResponse.getTopic() + new Gson().toJson(linkResponse.getData()), true); |
| | | } |
| | | } |
| | | } |
| | |
| | | uniCallBackBaseBean.setType(event.getType()); |
| | | uniCallBackBaseBean.setData(event.getData()); |
| | | HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_REPLY_OTA_MODEL, uniCallBackBaseBean); |
| | | HdlLogLogic.print( event.getTopic() + new Gson().toJson(event.getData()), true); |
| | | HdlLogLogic.print(event.getTopic() + new Gson().toJson(event.getData()), true); |
| | | } |
| | | } |
| | | |