From 2cba05dbec1324230771c3699e02c079f99afbf9 Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期三, 08 一月 2020 13:09:01 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/endian11/DriveJudge
---
app/src/main/java/safeluck/drive/evaluation/app.java | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/app/src/main/java/safeluck/drive/evaluation/app.java b/app/src/main/java/safeluck/drive/evaluation/app.java
index b4f7be0..9e4bb24 100644
--- a/app/src/main/java/safeluck/drive/evaluation/app.java
+++ b/app/src/main/java/safeluck/drive/evaluation/app.java
@@ -2,6 +2,7 @@
import android.app.Application;
import android.util.Log;
+import android.widget.Toast;
import androidx.annotation.NonNull;
@@ -14,8 +15,13 @@
import com.anyun.exam.lib.MyLog;
import com.anyun.exam.lib.crash.CrashHandler;
import com.facebook.stetho.Stetho;
+import com.google.gson.Gson;
+
+import safeluck.drive.evaluation.DB.failitems.FailedProj;
+import safeluck.drive.evaluation.DB.failitems.FailedProjRepository;
import safeluck.drive.evaluation.cEventCenter.CEventCenter;
+import safeluck.drive.evaluation.util.FileUtil;
import safeluck.drive.evaluation.util.SystemUtil;
/**
@@ -27,6 +33,7 @@
public class app extends Application implements IAYExamListener {
private static final String TAG = "app";
+ private Gson gson;
@Override
public void onCreate() {
@@ -68,9 +75,24 @@
@Override
public void callBackMsg(int cmd, String json) {
- MyLog.d(TAG, "鏀跺埌==" + json);
- CEventCenter.dispatchEvent("train",0,0,json);
+ MyLog.d(TAG, String.format("鏀跺埌鍛戒护[%d],Json鍐呭涓�%s",cmd,json));
+ switch (cmd){
+ case Constant.NDK_START:
+ Toast.makeText(this, "NDK start", Toast.LENGTH_SHORT).show();
+ break;
+ case Constant.FETCH_RTK_PLATFORM_INFO:
+ StringBuffer stringBuffer = FileUtil.readAssetTxtFile(getApplicationContext(),Constant.RTK_CONFIG_JSON);
+ MyLog.i(TAG, "RTK閰嶇疆淇℃伅锛�"+stringBuffer.toString());
+ AYSdk.getInstance().sendCmd(Constant.PUSH_RTK_PLATFORM_INFO,stringBuffer.toString());
+ break;
+ case Constant.JUDGE_INFO:
+ FailedProjRepository failedProjRepository = new FailedProjRepository(this);
+ failedProjRepository.insert(new FailedProj(1,cmd,Constant.TEST_STU_ID));
+ break;
+ }
+
}
+
}
--
Gitblit v1.8.0