| | |
| | | import com.hdl.photovoltaic.push.PushMessageInfoBean; |
| | | import com.hdl.photovoltaic.ui.BPowerStationActivity; |
| | | import com.hdl.photovoltaic.ui.StartActivity; |
| | | import com.hdl.photovoltaic.uni.HDLUniMPSDKManager; |
| | | import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus; |
| | | |
| | | import org.greenrobot.eventbus.EventBus; |
| | |
| | | title = remoteMessage.getNotification().getTitle(); |
| | | content = remoteMessage.getNotification().getBody(); |
| | | } |
| | | if (isAppInForeground(this)) { |
| | | //原生在前台或者uni在前台 |
| | | if (isAppInForeground(this) || HDLUniMPSDKManager.getInstance().showUniMP()) { |
| | | // 检查消息是否包含数据负载 |
| | | if (!remoteMessage.getData().isEmpty()) { |
| | | PushMessageInfoBean pushMessageInfoBean = HdlPushLogic.getInstance().pushDataProcessing(title, content, JSON.toJSONString(remoteMessage.getData())); |
| | | HdlPushLogic.getInstance().PushPushCommonData(this, pushMessageInfoBean, false); |
| | | // handleDataMessage(remoteMessage.getData()); |
| | | // this.showCustomNotification(pushMessageInfoBean); |
| | | } |
| | | } else { |
| | | // 检查消息是否包含通知负载 |