| | |
| | | registerActivityLifecycleCallbacks(this) |
| | | PlatformConfig.setWeixin("wx6078319d54d38c66", "c3ef243fae93fb0fd093d457ada38b4c") |
| | | PlatformConfig.setQQZone("102047428", "qcBXgbJo6B2f5HF0") //qq互联 |
| | | // CrashReport.initCrashReport(getApplicationContext(), "444bb776ed", false); |
| | | CrashReport.initCrashReport(this, "219deebe7c", true) |
| | | LogUtils.OpenLog(true) |
| | | // initUpPoint() |
| | | initSocket() |
| | |
| | | } |
| | | } |
| | | |
| | | private var errorCount = 0 //定位上传失败次数 |
| | | private fun sendLocation() { |
| | | if (getUserId() != -1 && aMapLocation != null) { |
| | | if (getUserId() != -1) { |
| | | if (aMapLocation == null|| aMapLocation!!.latitude <= 0){ |
| | | errorCount++ |
| | | if (errorCount == 10){ |
| | | Handler(Looper.getMainLooper()).postDelayed({ |
| | | getTTsManager().setVideoText("司机定位异常,请检查手机网络定位并重启司机APP") |
| | | errorCount = 0 |
| | | }, 600) |
| | | } |
| | | }else{ |
| | | errorCount = 0 |
| | | val bean = CarLocationBean() |
| | | val dataBean = CarLocationBean.DataBean( |
| | | getUserId(), |
| | |
| | | sysErr(dataBean.toString()) |
| | | } |
| | | } |
| | | } |
| | | |
| | | private fun sendHeart() { |
| | | if (getUserId() != -1) { |