| | |
| | | |
| | | import android.app.Application; |
| | | import android.util.Log; |
| | | import android.widget.Toast; |
| | | |
| | | |
| | | import androidx.annotation.NonNull; |
| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | public class app extends Application implements IAYExamListener { |
| | | |
| | | private static final String TAG = "app"; |
| | | private Gson gson; |
| | | |
| | | @Override |
| | | public void onCreate() { |
| | |
| | | |
| | | @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; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |