| | |
| | | import me.yokeyword.fragmentation.Fragmentation; |
| | | import me.yokeyword.fragmentation.helper.ExceptionHandler; |
| | | |
| | | import com.anyun.exam.lib.MyLog; |
| | | import com.anyun.basecommonlib.MyLog; |
| | | import com.anyun.exam.lib.crash.CrashHandler; |
| | | import com.facebook.stetho.Stetho; |
| | | import com.google.gson.JsonArray; |
| | |
| | | import safeluck.drive.evaluation.DB.appstatusdb.AppStatusWorker; |
| | | import safeluck.drive.evaluation.DB.criterias.CriteriaForI; |
| | | import safeluck.drive.evaluation.DB.criterias.CriteriaForIII; |
| | | import safeluck.drive.evaluation.DB.exam_status.ExamStatus; |
| | | import safeluck.drive.evaluation.DB.exam_status.ExamStatusOutWorker; |
| | | import safeluck.drive.evaluation.DB.exam_status.ExamStatusWoker; |
| | | import safeluck.drive.evaluation.DB.failitems.FailedProj; |
| | |
| | | import safeluck.drive.evaluation.util.FileUtil; |
| | | import safeluck.drive.evaluation.util.SystemUtil; |
| | | import safeluck.drive.evaluation.util.Utils; |
| | | import safeluck.drive.evaluation.worker.MCUUpgradeWorker; |
| | | |
| | | /** |
| | | * MyApplication2 |
| | |
| | | crashHandler.init(getApplicationContext()); |
| | | AYSdk.getInstance().init(getApplicationContext()); |
| | | AYSdk.getInstance().registListener(this); |
| | | MyLog.createIfNotExist(); |
| | | Stetho.initializeWithDefaults(this); |
| | | |
| | | appContext = this; |
| | |
| | | |
| | | private String lastStr; |
| | | private String lastSn; |
| | | private int mapId = 0; |
| | | int type = 0; |
| | | int enter_status = -1; |
| | | @Override |
| | | public void callBackMsg(final int cmd, String json) { |
| | | String strConent = String.format("收到命令[%d],Json内容为%s", cmd, json); |
| | |
| | | if(!TextUtils.isEmpty(json)){ |
| | | final JKMessage0203 jkMessage0203 = new JKMessage0203(); |
| | | |
| | | // Data judgeData = new Data.Builder().putString(Constant.TTS,json).build(); |
| | | final JsonArray jsonArray = (JsonArray) JsonParser.parseString(json); |
| | | // |
| | | // OneTimeWorkRequest ttswoker = new OneTimeWorkRequest.Builder(TTSWorker.class).setInputData(judgeData).build(); |
| | | // WorkManager.getInstance(getAppContext()).enqueue(ttswoker); |
| | | |
| | | CThreadPoolExecutor.runInBackground(new Runnable() { |
| | | @Override |
| | |
| | | WorkManager.getInstance(getApplicationContext()).enqueue(gpsinfoWorkRequest); |
| | | break; |
| | | case Constant.ENTER_OR_EXIT_ITEM: |
| | | int type = 0; |
| | | int enter_status = -1; |
| | | |
| | | try { |
| | | JSONObject rtkConfigUpdtea = new JSONObject(json); |
| | | type = rtkConfigUpdtea.getInt("type"); |
| | | enter_status = rtkConfigUpdtea.getInt("enter"); |
| | | mapId = rtkConfigUpdtea.getInt("map_id"); |
| | | |
| | | String itemstr=ExamPlatformData.getInstance().getItemStatusStr(type); |
| | | MyLog.i(PlatFormConstant.LUKAO,String.format("%s",itemstr+(enter_status==Constant.EXIT_CURRENT_ITEM?"结束":"开始"))); |
| | | if (ExamPlatformData.getInstance().getTrainingMode()== ExamPlatformData.TRAINING_MODE){ |
| | |
| | | } catch (JSONException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | Data exam_enter_exitdata = new Data.Builder().putString(Constant.exam_enter_exitdata,json).build(); |
| | | OneTimeWorkRequest examStatusWorker = new OneTimeWorkRequest.Builder(ExamStatusWoker.class).setInputData(exam_enter_exitdata).build(); |
| | | WorkManager.getInstance(getApplicationContext()).enqueue(examStatusWorker); |
| | | |
| | | MyLog.i("收到命令13="+json); |
| | | CThreadPoolExecutor.runInBackground(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | ExamStatus examStatus = new ExamStatus(); |
| | | examStatus.setEnter(enter_status); |
| | | examStatus.setMap_id(mapId); |
| | | examStatus.setMap_item(type); |
| | | WorkRoomDataBase.getWorkRoomDataBase(getApplicationContext()).getExamStatusDao().insert(examStatus); |
| | | } |
| | | }); |
| | | // Data exam_enter_exitdata = new Data.Builder().putString(Constant.exam_enter_exitdata,json).build(); |
| | | // OneTimeWorkRequest examStatusWorker = new OneTimeWorkRequest.Builder(ExamStatusWoker.class).setInputData(exam_enter_exitdata).build(); |
| | | // WorkManager.getInstance(getApplicationContext()).enqueue(examStatusWorker); |
| | | break; |
| | | case Constant.REAL_TIME_CAR_POS: |
| | | try { |