| | |
| | | import com.hdl.sdk.link.core.connect.HDLUdpConnect; |
| | | import com.hdl.sdk.link.core.utils.QueueUtils; |
| | | import com.hdl.sdk.link.core.utils.mqtt.MqttRecvClient; |
| | | import com.umeng.commonsdk.UMConfigure; |
| | | //import com.umeng.commonsdk.UMConfigure; |
| | | |
| | | import org.greenrobot.eventbus.EventBus; |
| | | |
| | |
| | | import java.util.Locale; |
| | | import java.util.Objects; |
| | | |
| | | import cn.jpush.android.api.JPushInterface; |
| | | //import cn.jpush.android.api.JPushInterface; |
| | | import io.dcloud.common.util.RuningAcitvityUtil; |
| | | import me.jessyan.autosize.AutoSize; |
| | | import me.jessyan.autosize.AutoSizeConfig; |
| | |
| | | |
| | | public class HDLApp extends Application { |
| | | |
| | | final String TAG=HDLApp.class.getName(); |
| | | final String TAG = HDLApp.class.getName(); |
| | | //控制打印 Debug模式打印 |
| | | private Boolean isLogEnabled = true; |
| | | //三方sdk初始化标识 |
| | |
| | | this.networkMonitoring(); |
| | | //初始化本地assets文件夹资源文件 |
| | | // this.initLocalAssetsData(); |
| | | //初始化友盟SDK |
| | | initUMengSDK(); |
| | | // //初始化友盟SDK,放在StartActivity里面初始化 |
| | | // initUMengSDK(); |
| | | |
| | | |
| | | } |
| | |
| | | * 集成教程地址: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() |
| | | } |
| | | |
| | | |
| | |
| | | AppManagerUtils.getAppManager().finishAllActivity(); |
| | | // HDLSDKSPUtils.clear();//底层自己清空 |
| | | |
| | | //清空住宅id |
| | | UserConfigManage.getInstance().setHomeId(""); |
| | | //重新登陆,默认同意隐私政策 |
| | | UserConfigManage.getInstance().setAcceiptPolicy(false); |
| | | //重新设定一个时间 |
| | |
| | | * 初始化极光SDK |
| | | */ |
| | | private void initJPush() { |
| | | JPushInterface.setDebugMode(true); |
| | | JPushInterface.init(getBaseContext()); |
| | | // JPushInterface.setDebugMode(true); |
| | | // JPushInterface.init(getBaseContext()); |
| | | } |
| | | |
| | | /** |