| | |
| | | import safeluck.drive.evaluation.platformMessage.JKMessage0101; |
| | | import safeluck.drive.evaluation.platformMessage.JKMessage0203; |
| | | import safeluck.drive.evaluation.platformMessage.JKMessage0206; |
| | | import safeluck.drive.evaluation.util.CThreadPoolExecutor; |
| | | import safeluck.drive.evaluation.util.FileUtil; |
| | | import safeluck.drive.evaluation.util.SPUtils; |
| | | import safeluck.drive.evaluation.util.SystemUtil; |
| | |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | String mapPath = ExamPlatformData.getInstance().getMapPath(); |
| | | final String mapPath = ExamPlatformData.getInstance().getMapPath(); |
| | | if (!TextUtils.isEmpty(mapPath)){ |
| | | MyLog.i("调用更新Map路径后的地图"+mapPath); |
| | | byte[] fileContent = FileUtil.readFile(mapPath); |
| | |
| | | AYSdk.getInstance().sendCmd(Constant.PUSH_MAP_INFO,str); |
| | | }else{ |
| | | MyLog.i(String.format("文件:%s不存在",mapPath)); |
| | | |
| | | CThreadPoolExecutor.runOnMainThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | Toast.makeText(getAppContext(), "文件:"+mapPath+"不存在", Toast.LENGTH_SHORT).show(); |
| | | } |
| | | }); |
| | | } |
| | | }else{ |
| | | MyLog.i("读取Assert目录下初始化的地图"); |
| | | CThreadPoolExecutor.runOnMainThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | Toast.makeText(getAppContext(), "读取Assert目录下初始化的地图", Toast.LENGTH_SHORT).show(); |
| | | } |
| | | }); |
| | | 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())); |
| | | CThreadPoolExecutor.runOnMainThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | Toast.makeText(getAppContext(), String.format("地图模型未拷入[%s]目录下", Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+getApplicationContext().getPackageName()), Toast.LENGTH_SHORT).show(); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |