| | |
| | | package com.mm.android.deviceaddmodule;
|
| | |
|
| | | import android.app.Activity;
|
| | | import android.app.Application;
|
| | | import android.content.Context;
|
| | | import android.content.Intent;
|
| | | import android.os.Bundle;
|
| | |
| | | public String userId = "";
|
| | | private String homeId;
|
| | |
|
| | | private Application context;
|
| | | public Application getContext() {
|
| | | return context;
|
| | | }
|
| | |
|
| | | public void setContext(Application context) {
|
| | | this.context = context;
|
| | | }
|
| | |
|
| | | public static LCDeviceEngine newInstance() {
|
| | | if (lcDeviceEngine == null) {
|
| | | synchronized (LCDeviceEngine.class) {
|
| | |
| | | this.accessToken = "St_0000c3e2e772d5f74bfca2d86eaa18a6";//为了低层空判断,当前token无效
|
| | | this.userId = "";
|
| | | this.sdkHasInit = false;
|
| | | this.context = commonParam.getContext();
|
| | | if (commonParam == null) {
|
| | | throw new Exception("commonParam must not null");
|
| | | }
|
| | |
| | | private void initParam(CommonParam commonParam) throws Exception {
|
| | | userId = TextUtils.isEmpty(commonParam.getUserId()) ? commonParam.getAppId() : commonParam.getUserId();
|
| | | //传入参数 AppId SecretKey 环境切换
|
| | | CONST.makeEnv(commonParam.getEnvirment(), commonParam.getAppId(), commonParam.getAppSecret());
|
| | | CONST.makeEnv(commonParam.getEnvirment(), commonParam.getAppId(), commonParam.getAppSecret());//
|
| | | ContextHelper.init(commonParam.getContext());
|
| | | new EnvironmentConfig.Builder().setContext(commonParam.getContext()).build();
|
| | | initImageLoader(commonParam.getContext());
|
| | |
| | | public void setHomeId(String homeId) {
|
| | | this.homeId = homeId;
|
| | | }
|
| | |
|
| | | private String productBrandldentity;
|
| | | public String getProductBrandldentity() { return productBrandldentity == null ? "" : productBrandldentity;}
|
| | |
|
| | | public void setProductBrandldentity(String productBrandldentity){
|
| | | this.productBrandldentity = productBrandldentity;
|
| | | }
|
| | | }
|