wjc
9 小时以前 41fc4df45eb9c43560a9660188a614ede0072200
app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java
@@ -40,7 +40,6 @@
import com.hdl.photovoltaic.other.HdlThreadLogic;
import com.hdl.photovoltaic.other.HdlUniLogic;
import com.hdl.photovoltaic.push.PushMessageInfoBean;
import com.hdl.photovoltaic.services.ForeService;
import com.hdl.photovoltaic.ui.bean.DeviceRemoteInfo;
import com.hdl.photovoltaic.ui.bean.HouseIdBean;
import com.hdl.photovoltaic.ui.bean.MessageBean;
@@ -60,7 +59,7 @@
import com.hdl.sdk.link.core.bean.gateway.GatewayBean;
import com.hdl.sdk.link.core.config.HDLLinkConfig;
import com.hdl.sdk.link.core.utils.mqtt.MqttRecvClient;
import com.umeng.analytics.MobclickAgent;
//import com.umeng.analytics.MobclickAgent;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
@@ -91,6 +90,10 @@
    @Override
    public void onBindView(Bundle savedInstanceState) {
//        //通知栏点击进来,防止应用在后台时被重复启动,阿里云推动通知指定打开某个Activity,没有设置Flags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);默认启动新实例,导致多个实例
//        if (!isTaskRoot()) {
//            finish();
//        }
        setStatusBarTranslucent();
        getWindow().setNavigationBarColor(getColor(R.color.text_FF000000));
        //C端启动App自动打开小程序电站详情界面
@@ -148,9 +151,10 @@
                return;
            }
            PushMessageInfoBean pushMessageInfoBean = HdlPushLogic.getInstance().pushDataProcessing("", "", data);
            if (TextUtils.isEmpty(pushMessageInfoBean.getMsgId())) {
            if (TextUtils.isEmpty(pushMessageInfoBean.getMsgId()) && !pushMessageInfoBean.isAiPrompt()) {
                return;
            }
            Log.d("==========111111", tag);
            HDLUniMPSDKManager.uinEnabled = false;
            if (tag.equals("onNewIntent")) {
                HDLUniMPSDKManager.uinEnabled = false;
@@ -204,7 +208,10 @@
                            @Override
                            public void run() {
                                if (pushMessageInfoBean.isAiPrompt()) {
                                    HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_open_ai_push_message, new HDLUniMP.UniCallBackBaseBean());
                                    HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean();
                                    uniCallBackBaseBean.setType(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_open_ai_push_message);
                                    HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, uniCallBackBaseBean);
                                    HdlLogLogic.print("uni---原生主动向小程序发送通知AI事件---", false);
                                } else {
                                    MessageBean messageBean = new MessageBean();
                                    messageBean.setMsgId(Long.valueOf(pushMessageInfoBean.getMsgId()));
@@ -212,6 +219,7 @@
                                    intentMessageInfoActivity.setClass(_mActivity, MessageInfoActivity.class);
                                    intentMessageInfoActivity.putExtra("messageBean", JSONObject.toJSONString(messageBean));
                                    startActivity(intentMessageInfoActivity);
                                    HdlLogLogic.print("uni---原生主动向小程序发送通知AI事件---11111", false);
                                }
                            }
@@ -415,8 +423,8 @@
                    HDLUniMPSDKManager.getInstance().getUniMP().closeUniMP();
                }
                AppManagerUtils.getAppManager().finishAllActivity();
                //如果开发者调用kill或者exit之类的方法杀死进程,或者双击back键会杀死进程,请务必在此之前调用MobclickAgent.onKillProcess方法,用来保存统计数据。
                MobclickAgent.onKillProcess(_mActivity);
//                //友盟sdk如果开发者调用kill或者exit之类的方法杀死进程,或者双击back键会杀死进程,请务必在此之前调用MobclickAgent.onKillProcess方法,用来保存统计数据。
//                MobclickAgent.onKillProcess(_mActivity);
                Process.killProcess(Process.myPid());
            }
        }
@@ -461,7 +469,7 @@
//                    UserConfigManage.getInstance().setRegistrationID(registrationID);
//                    UserConfigManage.getInstance().Save();
                    String finalRegistrationID = registrationID;
                    HdlResidenceLogic.getInstance().pushAdd(new CloudCallBeak<String>() {
                    HdlPushLogic.getInstance().pushAdd(new CloudCallBeak<String>() {
                        @Override
                        public void onSuccess(String pushId) {
@@ -498,7 +506,7 @@
        if (TextUtils.isEmpty(token)) {
            return;
        }
        HdlResidenceLogic.getInstance().pushAdd(new CloudCallBeak<String>() {
        HdlPushLogic.getInstance().pushAdd(new CloudCallBeak<String>() {
            @Override
            public void onSuccess(String pushId) {