| | |
| | | |
| | | } |
| | | |
| | | private void sendExamJson(int type) { |
| | | try { |
| | | MyLog.i("收到错误码之后,发送考试状态,examType="+type); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | if (type != Constant.NONE_BEEN_START_EXAM){ |
| | | |
| | | jsonObject.put("exam", 1); |
| | | }else{ |
| | | |
| | | jsonObject.put("exam", 0); |
| | | } |
| | | jsonObject.put("type", type); |
| | | String examJson = jsonObject.toString(); |
| | | Log.i(TAG, "onClick: " + examJson); |
| | | AYSdk.getInstance().sendCmd(Constant.EXAM_STATUS, examJson); |
| | | } catch (JSONException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | private void initData() { |
| | | CThreadPoolExecutor.runInBackground(()->{ |
| | |
| | | |
| | | DataInitKt.sendMapInfo(); |
| | | DataInitKt.sendRoadMapInfo(); |
| | | sendExamJson(ExamPlatformData.getInstance().getExamType()); |
| | | break; |
| | | case -2: |
| | | |
| | | DataInitKt.sendVehicleInfo(); |
| | | sendExamJson(ExamPlatformData.getInstance().getExamType()); |
| | | break; |
| | | case -3: |
| | | sendRouteExam(); |
| | | sendJudgeArgs(); |
| | | Data data = new Data.Builder().putInt(Constant.NEED_MAPS_CAR,1).build(); |
| | | OneTimeWorkRequest examStatausOutWorker1 = new OneTimeWorkRequest.Builder(ExamStatusOutWorker.class) |
| | | .setInputData(data).build(); |
| | | WorkManager.getInstance(getApplicationContext()).enqueue(examStatausOutWorker1); |
| | | sendRouteExam(); |
| | | sendJudgeArgs(); |
| | | |
| | | break; |
| | | } |
| | | } catch (JSONException e) { |