wjc
18 小时以前 abede488312c289351ea3724e25416e5889b206e
app/src/main/java/com/hdl/photovoltaic/ui/StartActivity.java
@@ -14,6 +14,7 @@
import androidx.annotation.NonNull;
import com.alibaba.fastjson.JSONObject;
import com.hdl.linkpm.sdk.core.exception.HDLException;
import com.hdl.linkpm.sdk.user.HDLLinkPMUser;
import com.hdl.photovoltaic.HDLApp;
@@ -23,6 +24,7 @@
import com.hdl.photovoltaic.config.UserConfigManage;
import com.hdl.photovoltaic.enums.Languages;
import com.hdl.photovoltaic.listener.CloudCallBeak;
import com.hdl.photovoltaic.other.HdlCommonLogic;
import com.hdl.photovoltaic.other.HdlResidenceLogic;
import com.hdl.photovoltaic.other.HdlUniLogic;
import com.hdl.photovoltaic.ui.bean.HouseIdBean;
@@ -30,10 +32,9 @@
import com.hdl.photovoltaic.uni.HDLUniMP;
import com.hdl.photovoltaic.uni.HDLUniMPSDKManager;
import com.hdl.photovoltaic.utils.BadgeUtils;
import com.hdl.photovoltaic.utils.LocalManageUtil;
import com.hdl.photovoltaic.utils.SharedPreUtils;
import com.hdl.photovoltaic.widget.ConfirmationCancelDialog;
import com.umeng.commonsdk.UMConfigure;
//import com.umeng.commonsdk.UMConfigure;
import java.util.List;
import java.util.Objects;
@@ -53,7 +54,7 @@
    @Override
    public void onBindView(Bundle savedInstanceState) {
        Log.d("StartActivity", "onBindView");
        Log.d("StartActivity====", "onBindView");
        setStatusBarTranslucent();
        getWindow().setNavigationBarColor(getColor(R.color.text_FF000000));
        BadgeUtils.cancelAllNotifications(_mActivity);
@@ -208,8 +209,8 @@
                        super.updateDrawState(ds);
                        //设置字体颜色
                        ds.setColor(getResources().getColor(R.color.text_38C494, null));
                        // 去掉下划线
                        ds.setUnderlineText(!UserConfigManage.getInstance().isZh());
                        // 去掉下划线(中文保留下划线)
                        ds.setUnderlineText(!UserConfigManage.getInstance().getCurrentAppLanguage().equals(Languages.zh));
                    }
@@ -232,7 +233,7 @@
                        //设置字体颜色
                        ds.setColor(getResources().getColor(R.color.text_38C494, null));
                        // 去掉下划线
                        ds.setUnderlineText(!UserConfigManage.getInstance().isZh());
                        ds.setUnderlineText(!UserConfigManage.getInstance().getCurrentAppLanguage().equals(Languages.zh));
                    }
@@ -261,9 +262,9 @@
        }
        HDLApp.getInstance().isStartInitThirdSDK = true;
        //初始化友盟SDK
        initUMengSDK();
        //初始化极光推送
        initJPush();
        // initUMengSDK();
//        //初始化极光推送
//        initJPush();
    }
@@ -281,12 +282,12 @@
     * 集成教程地址:https://developer.umeng.com/docs/119267/detail/118588
     */
    private void initUMengSDK() {
        UMConfigure.preInit(this, "6801aec0bc47b67d833fd76d", "XenterraSolar");
        //appkey和channl必须保持和预初始化一致!!!
        //deviceType:设备类型,UMConfigure.DEVICE_TYPE_PHONE为手机、UMConfigure.DEVICE_TYPE_BOX为盒子
        //pushSecret:Push推送业务的secret
        UMConfigure.init(this, "6801aec0bc47b67d833fd76d", "XenterraSolar", UMConfigure.DEVICE_TYPE_PHONE, "");
        UMConfigure.setLogEnabled(false);//AppConfigManage.isDebug()
//        UMConfigure.preInit(this, "6801aec0bc47b67d833fd76d", "XenterraSolar");
//        //appkey和channl必须保持和预初始化一致!!!
//        //deviceType:设备类型,UMConfigure.DEVICE_TYPE_PHONE为手机、UMConfigure.DEVICE_TYPE_BOX为盒子
//        //pushSecret:Push推送业务的secret
//        UMConfigure.init(this, "6801aec0bc47b67d833fd76d", "XenterraSolar", UMConfigure.DEVICE_TYPE_PHONE, "");
//        UMConfigure.setLogEnabled(false);//AppConfigManage.isDebug()
    }
    /**
@@ -298,8 +299,10 @@
        try {
            // 处理从通知点击带来的数据,这里获取数据,然后透传给主界面做处理
            if (getIntent().getExtras() != null) {
                Log.d("来自点击消息的数据===", JSONObject.toJSONString(getIntent().getExtras()));
                for (String key : getIntent().getExtras().keySet()) {
                    if (key.equals("pushData")) {
                    Log.d("来自点击消息的数据", "key: " + key + "  value: " + getIntent().getExtras().get(key));
                    if (key.equals("pushData") || key.equals("extraMap")) {
                        return Objects.requireNonNull(getIntent().getExtras().get(key)).toString();
                    }
                }
@@ -309,6 +312,5 @@
        }
        return "";
    }
}