| | |
| | | import safeluck.drive.evaluation.DB.gps.GpsInfoWorker; |
| | | import safeluck.drive.evaluation.DB.rtktb.RTKConfig; |
| | | import safeluck.drive.evaluation.DB.rtktb.RTKWorkRepository; |
| | | import safeluck.drive.evaluation.bean.ExamPlatformData; |
| | | import safeluck.drive.evaluation.cEventCenter.CEvent; |
| | | import safeluck.drive.evaluation.cEventCenter.CEventCenter; |
| | | import safeluck.drive.evaluation.im.IMSClientBootstrap; |
| | |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | StringBuffer vebuffer =FileUtil.readAssetTxtFile(getApplicationContext(),Constant.VEHICLE); |
| | | if (vebuffer != null){ |
| | | |
| | | AYSdk.getInstance().sendCmd(Constant.PUSH_VECHILE_PROFILE,vebuffer.toString()); |
| | | String carPath = ExamPlatformData.getInstance().getCarModelPath(); |
| | | if (!TextUtils.isEmpty(carPath)){ |
| | | MyLog.i("使用更新后的Car模型地图"+carPath); |
| | | byte[] bytes = FileUtil.readFile(carPath); |
| | | if (bytes != null){ |
| | | String str = new String(bytes); |
| | | AYSdk.getInstance().sendCmd(Constant.PUSH_VECHILE_PROFILE,str); |
| | | }else{ |
| | | MyLog.i(String.format("文件:%s不存在",carPath)); |
| | | } |
| | | }else{ |
| | | MyLog.d(TAG,String.format("车辆模型模型未拷入[%s]目录下", Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+getApplicationContext().getPackageName())); |
| | | StringBuffer vebuffer =FileUtil.readAssetTxtFile(getApplicationContext(),Constant.VEHICLE); |
| | | if (vebuffer != null){ |
| | | |
| | | AYSdk.getInstance().sendCmd(Constant.PUSH_VECHILE_PROFILE,vebuffer.toString()); |
| | | }else{ |
| | | MyLog.d(TAG,String.format("车辆模型模型未拷入[%s]目录下", Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+getApplicationContext().getPackageName())); |
| | | } |
| | | } |
| | | |
| | | } |
| | | }).start(); |
| | | } |
| | |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | StringBuffer buffer =FileUtil.readAssetTxtFile(getApplicationContext(),Constant.MAP); |
| | | if (buffer != null){ |
| | | |
| | | AYSdk.getInstance().sendCmd(Constant.PUSH_MAP_INFO,buffer.toString()); |
| | | String mapPath = ExamPlatformData.getInstance().getMapPath(); |
| | | if (!TextUtils.isEmpty(mapPath)){ |
| | | MyLog.i("调用更新Map路径后的地图"+mapPath); |
| | | byte[] fileContent = FileUtil.readFile(mapPath); |
| | | if (fileContent != null){ |
| | | String str = new String(fileContent); |
| | | Log.i(TAG, "文件内容:"+str); |
| | | AYSdk.getInstance().sendCmd(Constant.PUSH_MAP_INFO,str); |
| | | }else{ |
| | | MyLog.i(String.format("文件:%s不存在",mapPath)); |
| | | } |
| | | }else{ |
| | | MyLog.d(TAG,String.format("地图模型未拷入[%s]目录下", Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+getApplicationContext().getPackageName())); |
| | | MyLog.i("读取Assert目录下初始化的地图"); |
| | | StringBuffer buffer =FileUtil.readAssetTxtFile(getApplicationContext(),Constant.MAP); |
| | | if (buffer != null){ |
| | | |
| | | AYSdk.getInstance().sendCmd(Constant.PUSH_MAP_INFO,buffer.toString()); |
| | | }else{ |
| | | MyLog.d(TAG,String.format("地图模型未拷入[%s]目录下", Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+getApplicationContext().getPackageName())); |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | }).start(); |
| | | |