| | |
| | | import android.view.View; |
| | | |
| | | import com.hdl.linkpm.sdk.HDLLinkPMSdk; |
| | | import com.hdl.linkpm.sdk.core.exception.HDLException; |
| | | import com.hdl.photovoltaic.HDLApp; |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.CustomBaseActivity; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.databinding.ActivityLanguageSelectionBinding; |
| | | import com.hdl.photovoltaic.listener.CloudCallBeak; |
| | | import com.hdl.photovoltaic.other.HdlLogLogic; |
| | | import com.hdl.photovoltaic.other.HdlPushLogic; |
| | | import com.hdl.photovoltaic.other.HdlResidenceLogic; |
| | | import com.hdl.photovoltaic.other.HdlThreadLogic; |
| | | import com.hdl.photovoltaic.ui.BPowerStationActivity; |
| | | import com.hdl.photovoltaic.ui.CPowerStationActivity; |
| | | import com.hdl.photovoltaic.ui.StartActivity; |
| | | import com.hdl.photovoltaic.ui.adapter.LanguageAdapter; |
| | | import com.hdl.photovoltaic.uni.HDLUniMPSDKManager; |
| | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | setStatusBarTranslucent(); |
| | | getWindow().setNavigationBarColor(getColor(R.color.text_FF000000)); |
| | | readData(); |
| | | //初始化 |
| | | initView(); |
| | |
| | | @Override |
| | | public void run() { |
| | | hideLoading(); |
| | | UserConfigManage.getInstance().setTouristModeJumpLogic(false); |
| | | UserConfigManage.getInstance().setCurrentAppLanguage(itemData.getLanguage()); |
| | | UserConfigManage.getInstance().Save(); |
| | | //配置接口请求语言 |
| | | HDLLinkPMSdk.setLanguage(UserConfigManage.getInstance().getCurrentAppLanguage()); |
| | | |
| | | AppManagerUtils.getAppManager().finishAllActivity(); |
| | | // if (UserConfigManage.getInstance().isTourist_mode()) { |
| | | // Intent intent = new Intent(); |
| | | // intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); |
| | | // if (UserConfigManage.getInstance().isBAccount()) { |
| | | // intent.setClass(HDLApp.getInstance(), BPowerStationActivity.class); |
| | | // } else { |
| | | // intent.setClass(HDLApp.getInstance(), CPowerStationActivity.class); |
| | | // } |
| | | // startActivity(intent); |
| | | // } else { |
| | | Intent intent = new Intent(); |
| | | intent.setClass(HDLApp.getInstance(), StartActivity.class); |
| | | startActivity(intent); |
| | | // } |
| | | HdlPushLogic.getInstance().pushAdd(new CloudCallBeak<String>() { |
| | | @Override |
| | | public void onSuccess(String pushId) { |
| | | HdlLogLogic.print("添加令牌到云端 PushToken:" + UserConfigManage.getInstance().getPushToken() + " pushId:" + pushId, true); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(HDLException e) { |
| | | HdlLogLogic.print("添加令牌到云端失败 PushToken:" + UserConfigManage.getInstance().getPushToken() + " 错误:" + e.getMessage(), true); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |