| | |
| | | import android.app.Application; |
| | | import android.content.Context; |
| | | import android.os.Environment; |
| | | import android.os.Looper; |
| | | import android.text.TextUtils; |
| | | import android.util.Log; |
| | | import android.widget.Toast; |
| | |
| | | import org.json.JSONException; |
| | | import org.json.JSONObject; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | import java.util.Random; |
| | | |
| | | import okhttp3.ResponseBody; |
| | | import retrofit2.Call; |
| | | import retrofit2.Callback; |
| | | import retrofit2.Response; |
| | | import safeluck.drive.evaluation.DB.WorkRoomDataBase; |
| | | import safeluck.drive.evaluation.DB.appstatusdb.AppStatusWorker; |
| | | import safeluck.drive.evaluation.DB.criterias.CriteriaForI; |
| | |
| | | import safeluck.drive.evaluation.bean.ExamPlatformData; |
| | | import safeluck.drive.evaluation.cEventCenter.CEvent; |
| | | import safeluck.drive.evaluation.cEventCenter.CEventCenter; |
| | | import safeluck.drive.evaluation.httpmodule.HttpRequetBean; |
| | | import safeluck.drive.evaluation.httpmodule.RetrofitCreator; |
| | | import safeluck.drive.evaluation.im.IMSClientBootstrap; |
| | | import safeluck.drive.evaluation.im.IMSConnectStatusListener; |
| | | import safeluck.drive.evaluation.im.MessageProcessor; |
| | |
| | | private static final String TAG = "app"; |
| | | private Gson gson; |
| | | RTKConfig rtkConfig; |
| | | FailedProjRepository failedProjRepository;//失败项目表数据库 |
| | | Random random = new Random(); |
| | | private static Context appContext=null; |
| | | @Override |
| | |
| | | //数据库操作 |
| | | MyLog.i(TAG, "onCreate111"); |
| | | FileUtil.createdirs(getApplicationContext()); |
| | | failedProjRepository = new FailedProjRepository(this); |
| | | MyLog.i(TAG,"拷贝assert目录下的map" + |
| | | "和vechile json到包目录下"); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | FileUtil.copyAssertFileToSD(getApplicationContext(),Constant.MAP); |
| | | FileUtil.copyAssertFileToSD(getApplicationContext(),Constant.VEHICLE); |
| | | } |
| | | }).start(); |
| | | //1.先检查sd卡包名的目录下,是否存在地图文件和车辆模型文件 |
| | | //2. 如果不能再就去下载 |
| | | |
| | | |
| | | |