diff --git a/.gradle/5.6.4/executionHistory/executionHistory.bin b/.gradle/5.6.4/executionHistory/executionHistory.bin new file mode 100644 index 0000000..1c081de Binary files /dev/null and b/.gradle/5.6.4/executionHistory/executionHistory.bin differ diff --git a/.gradle/5.6.4/executionHistory/executionHistory.lock b/.gradle/5.6.4/executionHistory/executionHistory.lock new file mode 100644 index 0000000..bf2e6d7 Binary files /dev/null and b/.gradle/5.6.4/executionHistory/executionHistory.lock differ diff --git a/.gradle/5.6.4/fileChanges/last-build.bin b/.gradle/5.6.4/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/.gradle/5.6.4/fileChanges/last-build.bin differ diff --git a/.gradle/5.6.4/fileContent/fileContent.lock b/.gradle/5.6.4/fileContent/fileContent.lock new file mode 100644 index 0000000..186e7c0 Binary files /dev/null and b/.gradle/5.6.4/fileContent/fileContent.lock differ diff --git a/.gradle/5.6.4/fileHashes/fileHashes.bin b/.gradle/5.6.4/fileHashes/fileHashes.bin new file mode 100644 index 0000000..1a669da Binary files /dev/null and b/.gradle/5.6.4/fileHashes/fileHashes.bin differ diff --git a/.gradle/5.6.4/fileHashes/fileHashes.lock b/.gradle/5.6.4/fileHashes/fileHashes.lock new file mode 100644 index 0000000..f55cf59 Binary files /dev/null and b/.gradle/5.6.4/fileHashes/fileHashes.lock differ diff --git a/.gradle/5.6.4/fileHashes/resourceHashesCache.bin b/.gradle/5.6.4/fileHashes/resourceHashesCache.bin new file mode 100644 index 0000000..04456f8 Binary files /dev/null and b/.gradle/5.6.4/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/5.6.4/gc.properties b/.gradle/5.6.4/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/5.6.4/javaCompile/classAnalysis.bin b/.gradle/5.6.4/javaCompile/classAnalysis.bin new file mode 100644 index 0000000..9921a12 Binary files /dev/null and b/.gradle/5.6.4/javaCompile/classAnalysis.bin differ diff --git a/.gradle/5.6.4/javaCompile/jarAnalysis.bin b/.gradle/5.6.4/javaCompile/jarAnalysis.bin new file mode 100644 index 0000000..e62bf5b Binary files /dev/null and b/.gradle/5.6.4/javaCompile/jarAnalysis.bin differ diff --git a/.gradle/5.6.4/javaCompile/javaCompile.lock b/.gradle/5.6.4/javaCompile/javaCompile.lock new file mode 100644 index 0000000..76f364f Binary files /dev/null and b/.gradle/5.6.4/javaCompile/javaCompile.lock differ diff --git a/.gradle/5.6.4/javaCompile/taskHistory.bin b/.gradle/5.6.4/javaCompile/taskHistory.bin new file mode 100644 index 0000000..a82e7c2 Binary files /dev/null and b/.gradle/5.6.4/javaCompile/taskHistory.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..c03b297 Binary files /dev/null and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..1bd5cb8 --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Mon Aug 28 09:56:58 GMT+08:00 2023 +gradle.version=5.6.4 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..d4f056f Binary files /dev/null and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/app/build.gradle b/app/build.gradle index cc8a504..012506b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,8 +21,8 @@ android { applicationId "net.sysolution.taxiapp" minSdkVersion 21 targetSdkVersion 29 - versionCode 229 - versionName "3.3.3-beta26.3.9.3.5-release" + versionCode 235 + versionName "3.3.3-beta26.3.9.3.92-release" //alphaxx - 预览版本,不会对外发布,由测试人员测试,会有很多bug //Betaxx - 公开测试版本,会发给其他工作人员,会有较多版本 @@ -55,7 +55,7 @@ android { 26.3.8.3 优化taxiApp刷新列表时,播放列表相同时从缓存获取广告,更新定点广告时获取的定点regions也加入缓存机制 26.3.8.6.9 长时间未收到心跳重连的等待时间改成38s 26.3.9 更改了webSocket的连接保活代码,gps坐标记录两个点的距离由原来的50米记录一次改为20米记录一次 - 26.3.9.3.5 三分钟内收到两次清除排序指令才会清除排序,防止排序被清除 + 26.3.9.3.6 三分钟内收到两次清除排序指令才会清除排序,防止排序被清除 **/ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/TaxiApp.kt b/app/src/main/java/cn/trans88/taxiappkotlin/TaxiApp.kt index eaa3695..68b0298 100644 --- a/app/src/main/java/cn/trans88/taxiappkotlin/TaxiApp.kt +++ b/app/src/main/java/cn/trans88/taxiappkotlin/TaxiApp.kt @@ -22,6 +22,7 @@ import cn.trans88.taxiappkotlin.net.BizInterceptor import cn.trans88.taxiappkotlin.ui.custom.JVideoView import cn.trans88.taxiappkotlin.ui.play.PlayActivity import cn.trans88.taxiappkotlin.util.DateUtil +import cn.trans88.taxiappkotlin.util.KuroTimer import cn.trans88.taxiappkotlin.util.YoungUtil import com.facebook.stetho.Stetho import com.google.gson.Gson @@ -44,6 +45,7 @@ class TaxiApp:Application() { //缓存数据库所有广告 var daoAds:CopyOnWriteArrayList = CopyOnWriteArrayList() + var cacheDaoAds: ArrayList = ArrayList() //缓存数据库regions var regionsList:CopyOnWriteArrayList = CopyOnWriteArrayList() @@ -62,6 +64,9 @@ class TaxiApp:Application() { var timedAds:ArrayList = ArrayList() var activity:PlayActivity? = null + //日志定时器 + var gpsTimer: KuroTimer? = null + var testCount = 0 val TAG = "TaxiApp" val poolSize = Runtime.getRuntime().availableProcessors()*2+1 diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/logic/Repository.kt b/app/src/main/java/cn/trans88/taxiappkotlin/logic/Repository.kt index d02b01a..01cf57c 100644 --- a/app/src/main/java/cn/trans88/taxiappkotlin/logic/Repository.kt +++ b/app/src/main/java/cn/trans88/taxiappkotlin/logic/Repository.kt @@ -338,10 +338,18 @@ object Repository { //#edit by ljh @2023/8/7 val daoAdvertises:List = if (taxiApp.daoAds.isNotEmpty()){ "从缓存获取广告列表.数量:${taxiApp.daoAds.size}".logd() - taxiApp.daoAds.sortByDescending { +// taxiApp.daoAds.sortByDescending { +// it.createAt +// } +// taxiApp.daoAds + taxiApp.cacheDaoAds.clear() + for (daoAd in taxiApp.daoAds) { + taxiApp.cacheDaoAds.add(daoAd) + } + taxiApp.cacheDaoAds.sortByDescending { it.createAt } - taxiApp.daoAds + taxiApp.cacheDaoAds } else { // val currentAds = DaoUtil.getAdvertise().queryBuilder().orderDesc(AdvertiseDao.Properties.CreateAt).list() lazyList = DaoUtil.getAdvertise().queryBuilder().orderDesc(AdvertiseDao.Properties.CreateAt).listLazyUncached() @@ -352,10 +360,10 @@ object Repository { } "存储的广告数量:${daoAdvertises.size}".loge() //edit by ljh @2023/9/1 - if (daoAdvertises.size == 0){ - "卡里没广告了,清除排序".logd() - Configurations.config(TaxiApp.instance()).advertiseOrderSave("") - } +// if (daoAdvertises.size == 0){ +// "卡里没广告了,清除排序".logd() +// Configurations.config(TaxiApp.instance()).advertiseOrderSave("") +// } val advertises = mutableListOf() //定点广告list //#edit by ljh @2023/8/11 diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/ConnManger.kt b/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/ConnManger.kt index 5464fec..e3938f8 100644 --- a/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/ConnManger.kt +++ b/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/ConnManger.kt @@ -173,6 +173,8 @@ object ConnManger { if (!registerToken.equals(defaultToken)){ "is not defaultToken,save message to conn.".loge() initConnectMessage() + //测试平台要加 +// setServerToConn() } else { //是默认账号,看看conn有没保存信息,如果有则重新注册一遍 if (connService != null){ @@ -214,6 +216,54 @@ object ConnManger { // } } + /** + * 给conn设置凭证信息和服务地址 + */ + fun setServerToConn(){ + val serverWebSocketUrl = Configurations.config(TaxiApp.instance()).taxiServiceUrl() + val serverUrl = Configurations.config(TaxiApp.instance()).taxiBaseUrl() + connService?.let { + try { + if (serverWebSocketUrl.isNotEmpty()){ + "setConnWebSocketUrl:${serverWebSocketUrl}".loge() + setConnWebSocketUrl(serverWebSocketUrl) + } else { + "setConnServiceUrl:${serverUrl}".loge() + setConnServiceUrl(serverUrl) + } + } catch (e:Exception) { + "给conn设置服务地址失败,failed set conn server,e.message:${e.message}".loge() + } + } + } + + /** + * 给conn设置地址 + * @param url String + */ + private fun setConnWebSocketUrl(url: String){ + val sb = StringBuilder() + val split = url.split(":") + sb.apply { + if (url.contains("ws") || url.contains("wss")){ + append("http:") + if (split[2].isNotEmpty() && split[2].length > 5){ + append(split[2]) + } else { + append(split[1]) + sb.append(":2340") + } + } else { + append(url) + } + } + "conn webSocketUrl:${sb.toString()}".loge() + connService?.let { + val str = it.setServerURL(sb.toString()) + "设置conn服务器成功,conn response:$str".loge() + } + } + /** * 初始化connectMessage,并传给conn */ @@ -374,21 +424,26 @@ object ConnManger { } /** - * 发送坐标 + * 提交gps坐标 */ - fun sendLocation() { + fun sendLocationToWeb(){ YoungUtil.YoungLog("sendLocation in MainThread is ${Looper.getMainLooper().thread === Thread.currentThread()}") - //todo 如果这里突然有大量的信息序列化是不是同样会内存溢出 -// val locations = DaoUtil.getLocations() + //如果这里突然有大量的信息序列化是不是同样会内存溢出 + val locations = DaoUtil.getLocations() //edit by ljh @2023/8/8 每次只查20条定点数据,防止数据量大导致内存爆满 - val locations = DaoUtil.getLocationDao().queryBuilder().limit(20).list() +// val locations = DaoUtil.getLocationDao().queryBuilder().limit(20).list() if (locations.isNotEmpty()) { - val requestJson: String = if (locations.size < 20) { - ProcessingCommands.gson.toJson(locations) - } else { - ProcessingCommands.gson.toJson(locations.subList(0, 19)) - } +// val requestJson: String = if (locations.size < 20) { +// ProcessingCommands.gson.toJson(locations) +// } else { +// ProcessingCommands.gson.toJson(locations.subList(0, 19)) +// } + + val requestJson: String = ProcessingCommands.gson.toJson(locations) + + //日志存卡里 +// taxiApp.saveLog("上传的坐标信息:$requestJson") val parse = ("application/json;charset=UTF-8").toMediaTypeOrNull() val body = RequestBody.create(parse, requestJson) @@ -406,49 +461,68 @@ object ConnManger { call.enqueue(object : Callback { override fun onFailure(call: Call, e: IOException) { YoungUtil.YoungLog("上传坐标失败:${e.message}") + //日志存卡里 +// taxiApp.saveLog("上传坐标失败,不删除失败的数据") // DaoUtil.getLocationDao().deleteAll() } override fun onResponse(call: Call, response: Response) { YoungUtil.YoungLog("上传坐标成功:${response.message},response is Sussceful ${response.isSuccessful}${response.code}") if (response.code == 200) { - for (location in locations) { - DaoUtil.getLocationDao().delete(location) - } -// if (locations.size < 20) { -// DaoUtil.getLocationDao().deleteAll() -// } else { -// for (index in 0..19) { -// DaoUtil.getLocationDao().delete(locations[index]) +// for (location in locations) { +// DaoUtil.getLocationDao().delete(location) // } -// } +// if (locations.size < 20) { +// DaoUtil.getLocationDao().deleteAll() +// } else { +// for (index in 0..19) { +// DaoUtil.getLocationDao().delete(locations[index]) +// } +// } + DaoUtil.getLocationDao().deleteAll() + //日志存卡里 +// taxiApp.saveLog("上传坐标成功,删除上传成功的坐标:${locations.toString()}") } } }) } - //edit by yzd @20211201 - //if (Settings.gpsSwitch) { - if (Configurations.config(TaxiApp.instance()).gpsSwitch()) { -// "gpsSwitch on".loge() - val timer = KuroTimer() - timer.schedule(object : KuroTimerTask() { - override fun run() { - sendLocation() - } - }, 10000) - } else { - "gpsSwitch off".loge() - val timer = KuroTimer() - timer.schedule(object : KuroTimerTask() { - override fun run() { - sendLocation() - } + } - }, 60 * 60 * 1000) + /** + * 发送坐标 + */ + fun sendLocation() { + synchronized(ConnManger::class.java){ + taxiApp.gpsTimer?.let { + it.cancel() + it.purge() + } + //edit by yzd @20211201 + //if (Settings.gpsSwitch) { + if (Configurations.config(TaxiApp.instance()).gpsSwitch()) { + "gpsSwitch on".loge() + taxiApp.gpsTimer = KuroTimer() + taxiApp.gpsTimer?.schedule(object : KuroTimerTask() { + override fun run() { + sendLocationToWeb() +// sendLocation() + } + }, 0,10000) + } else { + "gpsSwitch off".loge() + taxiApp.gpsTimer = KuroTimer() + taxiApp.gpsTimer?.schedule(object : KuroTimerTask() { + override fun run() { + sendLocationToWeb() +// sendLocation() + } + }, 0,60 * 60 * 1000) + } } } + /** * 播放次数到了,发送终止广告指令 */ @@ -567,6 +641,7 @@ object ConnManger { }) } + var loggerTimer:KuroTimer? = null /** * 发送播放日志 */ @@ -629,9 +704,10 @@ object ConnManger { }) } - val timer = KuroTimer() - timer.schedule(object : KuroTimerTask() { + loggerTimer = KuroTimer() + loggerTimer?.schedule(object : KuroTimerTask() { override fun run() { + "loggerTimer task started".logd() sendLogger() } }, 30000) diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/ProcessingCommands.kt b/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/ProcessingCommands.kt index 5fd10ed..41e3be6 100644 --- a/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/ProcessingCommands.kt +++ b/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/ProcessingCommands.kt @@ -36,7 +36,6 @@ object ProcessingCommands { var areaIndex = 0 - /** * 三乐平台的命令 */ @@ -48,6 +47,12 @@ object ProcessingCommands { YoungUtil.YoungLog("baskTask :${baseTask.toString()}") if (baseTask.type != null) { + + //日志存卡里 +// if (!("beat_reply".equals(baseTask.type))){ +// taxiApp.saveLog(baseTask.toString()) +// } + val task = baseTask.task.toString() when (baseTask.type) { //添加普通广告 @@ -108,6 +113,9 @@ object ProcessingCommands { //Settings.gpsSwitch =gpsSwitch.isTurn_on Configurations.config(TaxiApp.instance()).gpsSwitchSave(gpsSwitch.isTurn_on) if (gpsSwitch.isTurn_on){ + //edit by ljh @2023/9/7 +// ConnManger.gpsTimer?.cancel() +// ConnManger.gpsTimer?.purge() ConnManger.sendLocation() } @@ -168,6 +176,8 @@ object ProcessingCommands { //Settings.loggerSwitch =loggerSwitch.isTurn_on Configurations.config(TaxiApp.instance()).loggerSwitchSave(loggerSwitch.isTurn_on) if (loggerSwitch.isTurn_on){ + ConnManger.loggerTimer?.cancel() + ConnManger.loggerTimer?.purge() ConnManger.sendLogger() } @@ -303,36 +313,39 @@ object ProcessingCommands { private fun clearAdvertiseOrder(task: String, type: String?) { val advertiseOrder = gson.fromJson(task) - + "clearAdvertiseOrder".logd() + //日志存卡里 +// taxiApp.saveLog("收到了清空排序指令...") //Settings.advertiseOrder = "" //edit by ljh @2023/8/9/1 //三分钟内收到两次清除排序才会清除排序,防止排序被清除 - taxiApp.isDoubleClearOrder += 1 - if(taxiApp.isDoubleClearOrder < 2){ - "没有点击两次清空排序,开始计时三分钟".logd() - taxiApp.clearOrderTimer.schedule(object :TimerTask(){ - override fun run() { - try { - taxiApp.isDoubleClearOrder = 0 - "三分钟时间到,isDoubleClearOrder重置".logd() - } catch (e:java.lang.Exception){ - e.printStackTrace() - } - } - },3*60*1000L) - } else { - "点击了两次清空排序,取消三分钟计时并清空排序".logd() - taxiApp.clearOrderTimer.cancel() - taxiApp.clearOrderTimer.purge() - taxiApp.clearOrderTimer = Timer() - Configurations.config(TaxiApp.instance()).advertiseOrderSave("") - taxiApp.isDoubleClearOrder = 0 - } +// taxiApp.isDoubleClearOrder += 1 +// if(taxiApp.isDoubleClearOrder < 2){ +// "没有点击两次清空排序,开始计时三分钟".logd() +// taxiApp.clearOrderTimer.schedule(object :TimerTask(){ +// override fun run() { +// try { +// taxiApp.isDoubleClearOrder = 0 +// "三分钟时间到,isDoubleClearOrder重置".logd() +// } catch (e:java.lang.Exception){ +// e.printStackTrace() +// } +// } +// },3*60*1000L) +// } else { +// "点击了两次清空排序,取消三分钟计时并清空排序".logd() +// taxiApp.clearOrderTimer.cancel() +// taxiApp.clearOrderTimer.purge() +// taxiApp.clearOrderTimer = Timer() +// Configurations.config(TaxiApp.instance()).advertiseOrderSave("") +// taxiApp.isDoubleClearOrder = 0 +// RefreshPlayer.refresh() +// } //edit by ljh @2023/8/22 // taxiApp.saveLog("clearAdvertiseOrder,清除了广告排序") - RefreshPlayer.refresh() + Configurations.config(TaxiApp.instance()).advertiseOrderSave("") val sanleResponse = SanleResponse() sanleResponse.task_id = advertiseOrder.task_id @@ -340,6 +353,10 @@ object ProcessingCommands { sanleResponse.type = type val response = gson.toJson(sanleResponse) send(response) + + RefreshPlayer.refresh() + + } /** diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/WsManager.kt b/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/WsManager.kt index 0727761..9295168 100644 --- a/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/WsManager.kt +++ b/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/WsManager.kt @@ -78,6 +78,8 @@ object WsManager { } else { this.removeMessages(10) "没收到心跳回复主动断线重连".logd() + //日志存卡里 +// Repository.taxiApp.saveLog("30s过去了,发了心跳信息没收到心跳回复主动断线重连...") ProcessingCommands.beatTimer?.cancel() ProcessingCommands.beatTimer?.purge() // ProcessingCommands.beatTimer = null @@ -101,6 +103,7 @@ object WsManager { .url("${Configurations.config(TaxiApp.instance()).taxiServiceUrl()}?auth_token=${Configurations.config(TaxiApp.instance()).appToken()}") // .url("http://192.168.1.141:2347/?auth_token=${Configurations.config(TaxiApp.instance()).appToken()}") // .url("http://1vf5fnic.beesnat.com/?auth_token=${Configurations.config(TaxiApp.instance()).appToken()}") +// .url("http://twan718b.beesnat.com/?auth_token=${Configurations.config(TaxiApp.instance()).appToken()}") // .url("http://192.168.43.191:2347/?auth_token=${Configurations.config(TaxiApp.instance()).appToken()}") .build() @@ -254,6 +257,8 @@ object WsManager { override fun onOpen(webSocket: WebSocket, response: Response) { super.onOpen(webSocket, response) YoungUtil.YoungLog("onOpen: connecting is open Ws连接成功!") + //日志存卡里 +// Repository.taxiApp.saveLog("onOpen: connecting is open Ws连接成功!") mWebSocket = webSocket //edit by ljh @2023/8/16 @@ -263,6 +268,8 @@ object WsManager { heartHandler.removeMessages(10) heartHandler.sendEmptyMessage(10) +// sendCurrentAdvertise() + } } } @@ -292,6 +299,8 @@ object WsManager { * 重连 */ private fun tryReconnect() { + //日志存卡里 +// Repository.taxiApp.saveLog("webSocket开始重连...") isRegister = false @@ -342,6 +351,11 @@ object WsManager { fun send(msg: String) { YoungUtil.YoungLog("回复服务器 $msg") + //日志存卡里 +// if(!(heartbeatContext.equals(msg))){ +// Repository.taxiApp.saveLog("回复服务器 $msg") +// } + mWebSocket?.send(msg) // mWebSocket?.send(msg) ?: throw IllegalArgumentException("mWebSocket is null not send!") } @@ -419,7 +433,9 @@ object WsManager { val currentAdvertises = Gson().toJson(currentPlayAdvertise) YoungUtil.YoungLog("当前在播放的广告: $currentAdvertises") - mWebSocket?.send(currentAdvertises) ?: throw IllegalArgumentException("mWebSocket is null not send!") + if(isConnected){ + mWebSocket?.send(currentAdvertises) ?: throw IllegalArgumentException("mWebSocket is null not send!") + } sendCurrentAdvertiseTimer?.let { it.cancel() diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayActivity.kt b/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayActivity.kt index 0e475b6..6620115 100644 --- a/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayActivity.kt +++ b/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayActivity.kt @@ -473,7 +473,7 @@ class PlayActivity : AppCompatActivity(), NetworkCallback, BusCallback, OnScreen RefreshPlayer.refresh() } - MainHandler.postDelay(10 * 60 * 1000, Runnable { + MainHandler.postDelay(20 * 60 * 1000, Runnable { timeRefreshAdvertise() }) } diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayViewModel.kt b/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayViewModel.kt index 92778c9..8d339fa 100644 --- a/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayViewModel.kt +++ b/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayViewModel.kt @@ -873,7 +873,7 @@ class PlayViewModel(val lifecycle: Lifecycle, private val fl_play: FrameLayout, } else { //YoungUtil.YoungLog("当前坐标 latitude:$latitude,longitude: $longitude , 速度 :$speed") //保存坐标地址 - YoungUtil.YoungLog("保存坐标") + YoungUtil.YoungLog("开始保存坐标") curLongitude = longitude curlatitude = latitude @@ -1030,7 +1030,8 @@ class PlayViewModel(val lifecycle: Lifecycle, private val fl_play: FrameLayout, distance = 0.0f elapse = 0 } - DaoUtil.getLocationDao().insert(location) + //不保存距离为0的点 edit by ljh @2023/9/9 +// DaoUtil.getLocationDao().insert(location) curLocation = location } else { if (curLocation?.longitude?.toDouble() != longitude || curLocation?.latitude?.toDouble() != latitude) { diff --git a/debug/TaxiApp_v3.3.3-beta26.3.9.3.92Local-debug{235}.apk b/debug/TaxiApp_v3.3.3-beta26.3.9.3.92Local-debug{235}.apk new file mode 100644 index 0000000..eddaa0e Binary files /dev/null and b/debug/TaxiApp_v3.3.3-beta26.3.9.3.92Local-debug{235}.apk differ diff --git a/debug/output.json b/debug/output.json index 4dc7b0f..1ab8639 100644 --- a/debug/output.json +++ b/debug/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":229,"versionName":"3.3.3-beta26.3.9.3.5-debug","enabled":true,"outputFile":"TaxiApp_v3.3.3-beta26.3.9.3.5-debug{229}.apk","fullName":"debug","baseName":"debug","dirName":""},"path":"TaxiApp_v3.3.3-beta26.3.9.3.5-debug{229}.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":235,"versionName":"3.3.3-beta26.3.9.3.92Local-debug","enabled":true,"outputFile":"TaxiApp_v3.3.3-beta26.3.9.3.92Local-debug{235}.apk","fullName":"debug","baseName":"debug","dirName":""},"path":"TaxiApp_v3.3.3-beta26.3.9.3.92Local-debug{235}.apk","properties":{}}] \ No newline at end of file diff --git a/local.properties b/local.properties index d02d2a7..9119a62 100644 --- a/local.properties +++ b/local.properties @@ -4,5 +4,5 @@ # Location of the SDK. This is only used by Gradle. # For customization when using a Version Control System, please read the # header note. -#Mon Aug 28 09:57:51 GMT+08:00 2023 +#Thu Sep 07 10:09:52 GMT+08:00 2023 sdk.dir=D\:\\Android\\sdk diff --git a/release/output.json b/release/output.json index f3b7fd3..bdcc7da 100644 --- a/release/output.json +++ b/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":229,"versionName":"3.3.3-beta26.3.9.3.5-release","enabled":true,"outputFile":"TaxiApp_v3.3.3-beta26.3.9.3.5-release{229}.apk","fullName":"release","baseName":"release","dirName":""},"path":"TaxiApp_v3.3.3-beta26.3.9.3.5-release{229}.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":235,"versionName":"3.3.3-beta26.3.9.3.92-release","enabled":true,"outputFile":"TaxiApp_v3.3.3-beta26.3.9.3.92-release{235}.apk","fullName":"release","baseName":"release","dirName":""},"path":"TaxiApp_v3.3.3-beta26.3.9.3.92-release{235}.apk","properties":{}}] \ No newline at end of file