| | |
| | | import com.anyun.exam.lib.MyLog; |
| | | import com.anyun.exam.lib.crash.CrashHandler; |
| | | import com.anyun.im_lib.ExecutorServiceFactory; |
| | | import com.anyun.im_lib.listener.IMSConnectStatusCallback; |
| | | import com.facebook.stetho.Stetho; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.JsonArray; |
| | | import com.google.gson.JsonObject; |
| | | import com.google.gson.JsonParser; |
| | | import com.safeluck.aykj.utils.BytesUtils; |
| | | |
| | | |
| | | import org.json.JSONException; |
| | | import org.json.JSONObject; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Random; |
| | | |
| | | import safeluck.drive.evaluation.DB.WorkRoomDataBase; |
| | |
| | | import safeluck.drive.evaluation.DB.rtktb.RTKWorkRepository; |
| | | import safeluck.drive.evaluation.cEventCenter.CEvent; |
| | | import safeluck.drive.evaluation.cEventCenter.CEventCenter; |
| | | import safeluck.drive.evaluation.im.IMSClientBootstrap; |
| | | import safeluck.drive.evaluation.im.IMSConnectStatusListener; |
| | | import safeluck.drive.evaluation.im.MessageProcessor; |
| | | import safeluck.drive.evaluation.platformMessage.JKMessage0100; |
| | | import safeluck.drive.evaluation.platformMessage.JKMessage0101; |
| | | import safeluck.drive.evaluation.platformMessage.JKMessage0203; |
| | | import safeluck.drive.evaluation.util.FileUtil; |
| | | import safeluck.drive.evaluation.util.SPUtils; |
| | | import safeluck.drive.evaluation.util.SystemUtil; |
| | | |
| | | /** |
| | |
| | | * 邮箱:632393724@qq.com |
| | | * All Rights Saved! Chongqing AnYun Tech co. LTD |
| | | */ |
| | | public class app extends Application implements IAYExamListener { |
| | | public class app extends Application implements IAYExamListener { |
| | | |
| | | private static final String TAG = "app"; |
| | | private Gson gson; |
| | |
| | | } |
| | | }).start(); |
| | | |
| | | //TODO 进行tcp连接 |
| | | |
| | | //TODO 判断SPUtils 是否保存有des密码;如果没有则进行注册JKMessage0100,如果有密码则进行鉴权JKMessage0101 |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | MyLog.e(TAG, "OnTerminate()"); |
| | | } |
| | | |
| | | private String lastStr; |
| | | @Override |
| | | public void callBackMsg(final int cmd, String json) { |
| | | MyLog.d(TAG, String.format("收到命令[%d],Json内容为%s", cmd, json)); |
| | | String strConent = String.format("收到命令[%d],Json内容为%s", cmd, json); |
| | | if (strConent.equalsIgnoreCase(lastStr)){ |
| | | |
| | | }else{ |
| | | |
| | | MyLog.d(TAG,strConent ); |
| | | lastStr = strConent; |
| | | } |
| | | switch (cmd) { |
| | | case Constant.NDK_START: |
| | | sendVechileInfo(); |
| | |
| | | case Constant.JUDGE_INFO: |
| | | |
| | | if(!TextUtils.isEmpty(json)){ |
| | | JKMessage0203 jkMessage0203 = new JKMessage0203(); |
| | | jkMessage0203.phone = "0314200100000004"; |
| | | jkMessage0203.timeBCD = new Date(); |
| | | jkMessage0203.fail_item_id = 4; |
| | | jkMessage0203.fail_score = 10; |
| | | jkMessage0203.fail_reason = "发动机启动后,不及时松开启动开关"; |
| | | jkMessage0203.ID = "123456789"; |
| | | jkMessage0203.exam_id = 123456; |
| | | MessageProcessor.getInstance().sendMessage(jkMessage0203); |
| | | JsonArray jsonArray = JsonParser.parseString(json).getAsJsonArray(); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JsonObject jsonObject = jsonArray.get(i).getAsJsonObject(); |
| | |
| | | }).start(); |
| | | |
| | | } |
| | | |
| | | |
| | | } |