| | |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.hdl.photovoltaic.config.ConstantManage; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.enums.MessageStateType; |
| | | import com.hdl.photovoltaic.jpush.JPushMessageInfoBean; |
| | | import com.hdl.photovoltaic.ui.CPowerStationActivity; |
| | | import com.hdl.photovoltaic.ui.MyPowerStationActivity; |
| | | import com.hdl.photovoltaic.ui.bean.MessageBean; |
| | | import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus; |
| | |
| | | //添加推送数据到缓存列表中; |
| | | this.addPushDataToMemoryList(jPushMessageInfoBean); |
| | | if (isOpened) { |
| | | Intent intent = new Intent(context, MyPowerStationActivity.class); |
| | | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); |
| | | intent.putExtra("skip", "skip");//里面判断有这个标识就跳转到消息中心界面 |
| | | context.startActivity(intent); |
| | | if (UserConfigManage.getInstance().isBAccount()) { |
| | | //安装商跳转界面 |
| | | Intent intent = new Intent(context, MyPowerStationActivity.class); |
| | | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); |
| | | intent.putExtra("skip", "skip");//里面判断有这个标识就跳转到消息中心界面 |
| | | context.startActivity(intent); |
| | | } |
| | | } else { |
| | | BaseEventBus bus = new BaseEventBus(); |
| | | bus.setTopic(ConstantManage.message_function_push_post); |
| | |
| | | if (messageBean == null) { |
| | | return; |
| | | } |
| | | messageBean.setTitle(jPushMessageInfoBean.getTitle()); |
| | | messageBean.setTitle(jPushMessageInfoBean.getContent()); |
| | | messageBean.setDeviceDesc(jPushMessageInfoBean.getContent()); |
| | | HdlMessageLogic.getInstance().setListMessage(messageBean, 0); |
| | | HdlLogLogic.print("添加在推送数据到缓存列表中--->成功"); |
| | | HdlLogLogic.print("极光推送--->添加在推送数据到缓存列表中--->" + new Gson().toJson(jPushMessageInfoBean)); |
| | | } catch (Exception ignored) { |
| | | } |
| | | } |