| | |
| | | package safeluck.drive.evaluation; |
| | | |
| | | import android.app.Application; |
| | | import android.os.Environment; |
| | | import android.text.TextUtils; |
| | | import android.widget.Toast; |
| | | |
| | |
| | | |
| | | //数据库操作 |
| | | MyLog.i(TAG, "onCreate111"); |
| | | FileUtil.createdirs(getApplicationContext()); |
| | | failedProjRepository = new FailedProjRepository(this); |
| | | rtkWorkRepository = new RTKWorkRepository(this); |
| | | } |
| | |
| | | break; |
| | | case Constant.FETCH_MAP_INFO: |
| | | |
| | | StringBuffer buffer =FileUtil.readAssetTxtFile(this,Constant.MAP); |
| | | AYSdk.getInstance().sendCmd(Constant.PUSH_MAP_INFO,buffer.toString()); |
| | | StringBuffer buffer =FileUtil.readTxtFileFromSD(this,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())); |
| | | |
| | | } |
| | | break; |
| | | case Constant.REQ_VECHILE_PROFILE: |
| | | StringBuffer vebuffer =FileUtil.readAssetTxtFile(this,Constant.VEHICLE); |
| | | AYSdk.getInstance().sendCmd(Constant.PUSH_VECHILE_PROFILE,vebuffer.toString()); |
| | | StringBuffer vebuffer =FileUtil.readTxtFileFromSD(this,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())); |
| | | } |
| | | break; |
| | | case Constant.GPS_INFO: |
| | | Data gpsData = new Data.Builder().putString(Constant.GPS_INFO_DATA,json).build(); |