| | |
| | | import safeluck.drive.evaluation.cEventCenter.CEventCenter; |
| | | import safeluck.drive.evaluation.im.MessageProcessor; |
| | | import safeluck.drive.evaluation.platformMessage.AttachInfo; |
| | | import safeluck.drive.evaluation.platformMessage.AttachInfo2; |
| | | import safeluck.drive.evaluation.platformMessage.JKMessage0203; |
| | | import safeluck.drive.evaluation.platformMessage.JKMessage0206; |
| | | import safeluck.drive.evaluation.platformMessage.PlatFormConstant; |
| | |
| | | //数据库操作 |
| | | MyLog.i(TAG, "onCreate111"); |
| | | FileUtil.createdirs(getApplicationContext()); |
| | | //1.先检查sd卡包名的目录下,是否存在地图文件和车辆模型文件 |
| | | //2. 如果不能再就去下载 |
| | | |
| | | //考试状态 ,一些初始状态,app一些状态应该先初始化一下 |
| | | initData(); |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | private void initData() { |
| | | CThreadPoolExecutor.runInBackground(()->{ |
| | | int type = WorkRoomDataBase.getWorkRoomDataBase(getApplicationContext()).getExamStatusDao().getStartExamInt(); |
| | | ExamPlatformData.getInstance().setExamType(type); |
| | | }); |
| | | } |
| | | |
| | | public static Context getAppContext(){ |
| | |
| | | jkMessage0206.json =json; |
| | | jkMessage0206.length = jkMessage0206.json.length(); |
| | | AttachInfo attachInfo = new AttachInfo(); |
| | | attachInfo.attach_message_id = Integer.parseInt(String.valueOf(0x40)); |
| | | attachInfo.attach_message_length = 4; |
| | | if (attachInfo.attach_message_id == 0x41){ |
| | | attachInfo.attach_data="00000000"; |
| | | }else{ |
| | | AttachInfo2 attachInfo2 = new AttachInfo2(); |
| | | attachInfo.attach_message_id = 0x41; |
| | | |
| | | //18个字节 ascii |
| | | attachInfo.attach_data="303030303030303030303030303030303030"; |
| | | } |
| | | |
| | | jkMessage0206.attachInfo = attachInfo; |
| | | |
| | | |
| | | attachInfo2.attach_message_id = 0x42; |
| | | if (ExamPlatformData.getInstance().getExamType()>ExamPlatformData.EXAM_TYPE_ChangKAO){ |
| | | attachInfo2.attach_data =1; |
| | | }else{ |
| | | |
| | | attachInfo2.attach_data = 0; |
| | | } |
| | | jkMessage0206.attachInfo2 = attachInfo2; |
| | | if (ExamPlatformData.getInstance().getTrainingMode()==ExamPlatformData.MODE_NONE){ |
| | | //判断10s时间是否到 |
| | | if (ExamPlatformData.getInstance().isTimeArrive_10s()){ |