wjc
3 天以前 544ea36d8c66cca428c45fe325dc358390f4cf6b
app/src/main/java/com/hdl/photovoltaic/push/fcm/MyFirebaseMessagingService.java
@@ -26,6 +26,7 @@
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;
@@ -72,12 +73,13 @@
            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 {
            // 检查消息是否包含通知负载