diff --git a/.gradle/5.6.4/executionHistory/executionHistory.bin b/.gradle/5.6.4/executionHistory/executionHistory.bin
index 448421b..d3142ab 100644
Binary files a/.gradle/5.6.4/executionHistory/executionHistory.bin 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
index 40fe4c1..3e87dce 100644
Binary files a/.gradle/5.6.4/executionHistory/executionHistory.lock and b/.gradle/5.6.4/executionHistory/executionHistory.lock differ
diff --git a/.gradle/5.6.4/fileHashes/fileHashes.bin b/.gradle/5.6.4/fileHashes/fileHashes.bin
index 4c12fbc..a7d2d44 100644
Binary files a/.gradle/5.6.4/fileHashes/fileHashes.bin 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
index 6915ff0..db6c475 100644
Binary files a/.gradle/5.6.4/fileHashes/fileHashes.lock 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
index 4a5b2d7..f01dafb 100644
Binary files a/.gradle/5.6.4/fileHashes/resourceHashesCache.bin and b/.gradle/5.6.4/fileHashes/resourceHashesCache.bin differ
diff --git a/.gradle/5.6.4/javaCompile/classAnalysis.bin b/.gradle/5.6.4/javaCompile/classAnalysis.bin
index 3d5b8eb..a19132e 100644
Binary files a/.gradle/5.6.4/javaCompile/classAnalysis.bin 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
index b0ad632..a7f64f5 100644
Binary files a/.gradle/5.6.4/javaCompile/jarAnalysis.bin 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
index f25fc13..a18ffac 100644
Binary files a/.gradle/5.6.4/javaCompile/javaCompile.lock 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
index ac697b9..fd12e4e 100644
Binary files a/.gradle/5.6.4/javaCompile/taskHistory.bin and b/.gradle/5.6.4/javaCompile/taskHistory.bin differ
diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock
index 29bf16b..8182005 100644
Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin
index 310ed54..9d33693 100644
Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and b/.gradle/buildOutputCleanup/outputFiles.bin differ
diff --git a/.idea/libraries/Gradle__com_amitshekhar_android_debug_db_base_1_0_6_aar.xml b/.idea/libraries/Gradle__com_amitshekhar_android_debug_db_base_1_0_6_aar.xml
index 271ee11..e25eae6 100644
--- a/.idea/libraries/Gradle__com_amitshekhar_android_debug_db_base_1_0_6_aar.xml
+++ b/.idea/libraries/Gradle__com_amitshekhar_android_debug_db_base_1_0_6_aar.xml
@@ -7,6 +7,9 @@
+
+
+
diff --git a/.idea/libraries/Gradle__com_facebook_stetho_stetho_1_5_1_aar.xml b/.idea/libraries/Gradle__com_facebook_stetho_stetho_1_5_1_aar.xml
index 62ae5d2..f5d97e6 100644
--- a/.idea/libraries/Gradle__com_facebook_stetho_stetho_1_5_1_aar.xml
+++ b/.idea/libraries/Gradle__com_facebook_stetho_stetho_1_5_1_aar.xml
@@ -3,6 +3,7 @@
+
@@ -11,6 +12,9 @@
+
+
+
diff --git a/.idea/libraries/Gradle__com_github_yuweiguocn_GreenDaoUpgradeHelper_v2_2_1_aar.xml b/.idea/libraries/Gradle__com_github_yuweiguocn_GreenDaoUpgradeHelper_v2_2_1_aar.xml
index d2f957a..872a8f5 100644
--- a/.idea/libraries/Gradle__com_github_yuweiguocn_GreenDaoUpgradeHelper_v2_2_1_aar.xml
+++ b/.idea/libraries/Gradle__com_github_yuweiguocn_GreenDaoUpgradeHelper_v2_2_1_aar.xml
@@ -7,6 +7,9 @@
+
+
+
diff --git a/.idea/libraries/Gradle__com_orhanobut_logger_2_2_0_aar.xml b/.idea/libraries/Gradle__com_orhanobut_logger_2_2_0_aar.xml
index 8ade13e..30bd9ca 100644
--- a/.idea/libraries/Gradle__com_orhanobut_logger_2_2_0_aar.xml
+++ b/.idea/libraries/Gradle__com_orhanobut_logger_2_2_0_aar.xml
@@ -7,6 +7,9 @@
+
+
+
diff --git a/.idea/modules/app/taxiapp-ktl.app.iml b/.idea/modules/app/taxiapp-ktl.app.iml
index c11c95a..646c0c4 100644
--- a/.idea/modules/app/taxiapp-ktl.app.iml
+++ b/.idea/modules/app/taxiapp-ktl.app.iml
@@ -31,7 +31,7 @@
-
+
@@ -82,6 +82,9 @@
+
+
+
@@ -91,11 +94,11 @@
-
+
+
-
diff --git a/.idea/modules/kurolibrary/taxiapp-ktl.kurolibrary.iml b/.idea/modules/kurolibrary/taxiapp-ktl.kurolibrary.iml
index 1ec60f2..abeb345 100644
--- a/.idea/modules/kurolibrary/taxiapp-ktl.kurolibrary.iml
+++ b/.idea/modules/kurolibrary/taxiapp-ktl.kurolibrary.iml
@@ -75,6 +75,9 @@
+
+
+
@@ -84,11 +87,11 @@
+
+
-
-
diff --git a/.idea/modules/kurotool/taxiapp-ktl.kurotool.iml b/.idea/modules/kurotool/taxiapp-ktl.kurotool.iml
index 5aca6dd..cf6fbec 100644
--- a/.idea/modules/kurotool/taxiapp-ktl.kurotool.iml
+++ b/.idea/modules/kurotool/taxiapp-ktl.kurotool.iml
@@ -89,11 +89,11 @@
-
-
-
+
+
+
diff --git a/app/build.gradle b/app/build.gradle
index 294c507..1da9b16 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -21,8 +21,8 @@ android {
applicationId "net.sysolution.taxiapp"
minSdkVersion 21
targetSdkVersion 29
- versionCode 178
- versionName "3.3.3-beta26.3.6-debug"
+ versionCode 188
+ versionName "3.3.3-beta26.3.3.8.3-release"
//alphaxx - 预览版本,不会对外发布,由测试人员测试,会有很多bug
//Betaxx - 公开测试版本,会发给其他工作人员,会有较多版本
@@ -47,6 +47,8 @@ android {
凭证信息可备份至conn,防止跑账号
26.3.2 解决卸载重装后设备不在原来的分组问题
26.3.3 解决直接升级后设备不播放广告或者等很久才播放问题
+ 26.3.7 由于经常掉线,心跳改回30s发一次,重连时间改回10s,日志开关默认关闭
+ 26.3.8 更换了播放器默认logo图,修改同步的时候出现logo问题,增加“查询是否设置过logo”功能
**/
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 9e9541d..d8d36e6 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -22,10 +22,19 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppStartLoadTranslucent">
+
+
+
+
+
+
+ android:exported="true" />
>()
+var myListMapTemp = mutableMapOf>()
object Repository {
// private val circularListMap = mapOf(AdvertiseType.NORMAL.ordinal to CircularList(),AdvertiseType.AREA.ordinal to CircularList())
private val circularListMap = mutableMapOf>()
@@ -87,6 +88,7 @@ object Repository {
fun getAdvertiseTEST(): Advertise? {
val list = myListMap[getTestPlayLevels()]
+ val listTemp = myListMapTemp[getTestPlayLevels()]
"广告数量:${list?.size}".loge()
//#edit by ljh 2023/2/16
@@ -95,7 +97,7 @@ object Repository {
advertise = if (isTimedAdvertise){
getTestPlayAdvertise(taxiApp.timedAds)
} else {
- getTestPlayAdvertise(list)
+ getTestPlayAdvertise(list) ?: getTestPlayAdvertiseByTempList(listTemp)
}
// val advertise = getTestPlayAdvertise(myListMap[getTestPlayLevels()])
return advertise
@@ -161,6 +163,7 @@ object Repository {
return null
}
+
/**
* 拿到将要播放的广告
*/
@@ -224,6 +227,43 @@ object Repository {
return null
}
+ /**
+ * 拿到将要播放的广告
+ */
+ private fun getTestPlayAdvertiseByTempList(list: MutableList?): Advertise? {
+ YoungUtil.YoungLog("getTestPlayAdvertiseByTempList")
+ val currentTimeMillis = System.currentTimeMillis()
+ list?.let {
+ if (it.isEmpty()) {
+ "播放列表是空的".loge()
+ return null
+ }
+ //防止如果需求定点广告切换成普通广告,但是要继续上次普通广告的播放,然后现在的广告列表数改变,下标越界的情况
+// if(currentListOrder>=list.size){
+// currentListOrder=0
+// }
+
+ for (index in 0..list.size) {
+
+ //防止下标越界
+ if (currentListOrder >= list.size) {
+ currentListOrder = 0
+ }
+
+ //YoungUtil.YoungLog("当前播放的广告list位数 : $currentListOrder")
+ val advertise = list[currentListOrder]
+
+ if (advertise.isAllowPlay()) {
+ //YoungUtil.YoungLog("拿到广告花费时间 :${System.currentTimeMillis() - currentTimeMillis}")
+ YoungUtil.YoungLog("拿到广告:" + advertise.ad_id)
+ return advertise
+ }
+ }
+
+ }
+ return null
+ }
+
/**
* 拿到应该播放的等级
@@ -277,7 +317,15 @@ object Repository {
YoungUtil.YoungLog("refreshMyList 是否在主线程: ${Thread.currentThread().isMainThread()}")
// myListMap.clear()
+ //#edit by ljh @2023/6/29
for (index in AdvertiseType.values().size downTo 0) {
+ //清空前先备份一下列表
+ myListMapTemp[index] = if (myListMap[index].isNullOrEmpty()){
+ ArrayList()
+ } else {
+ myListMap[index]!!
+ }
+ myListMap[index]?.clear()
myListMap[index] = ArrayList()
}
@@ -395,7 +443,7 @@ object Repository {
}
if (newAdvertise.isAllowPlay()) {
- //#edit by ljh @2023/2/23 myListMap集合只存放不定时的广告
+ //#edit by ljh @2023/2/23 myListMap集合只存放不是定时插播的广告
if (!newAdvertise.isTimedAd){
"广告准备ok 加入Mylist 广告ad_id:${newAdvertise.ad_id},是否是最后一个广告:${newAdvertise.isLast},belongto: ${newAdvertise.belongTo}".loge("Repository")
myListMap[newAdvertise.belongTo]?.add(newAdvertise)
@@ -418,7 +466,6 @@ object Repository {
//YoungUtil.YoungLog("刷新列表用时${last - currentTimeMillis}")
}
-
private fun oldAdvertiseToNewAdvertise(oldAdvertise: Advertise): Advertise {
"oldAdvertise:$oldAdvertise,isCount:${oldAdvertise.isCount}".loge()
diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/logic/dao/DaoUtil.kt b/app/src/main/java/cn/trans88/taxiappkotlin/logic/dao/DaoUtil.kt
index 0634212..484d92e 100644
--- a/app/src/main/java/cn/trans88/taxiappkotlin/logic/dao/DaoUtil.kt
+++ b/app/src/main/java/cn/trans88/taxiappkotlin/logic/dao/DaoUtil.kt
@@ -10,6 +10,7 @@ object DaoUtil {
val taxiApp = TaxiApp.instance() as TaxiApp
var daoSession:DaoSession = taxiApp.getDaoSession()
+ var daoMaster:DaoMaster = taxiApp.getDaoMaster()
private var mOrderDao:OrderDao
private var mPlayLoggerDao:PlayLoggerDao
@@ -57,6 +58,7 @@ object DaoUtil {
@Synchronized
fun getLocationDao(): LocationDao {
return mLocationDao
+// return daoMaster.newSession().locationDao
}
@Synchronized
diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/logic/model/BackgroundType.kt b/app/src/main/java/cn/trans88/taxiappkotlin/logic/model/BackgroundType.kt
new file mode 100644
index 0000000..eff27cf
--- /dev/null
+++ b/app/src/main/java/cn/trans88/taxiappkotlin/logic/model/BackgroundType.kt
@@ -0,0 +1,9 @@
+package cn.trans88.taxiappkotlin.logic.model
+
+/**
+ *
+ * @Author: LJH
+ * @Time: 2023/6/28
+ * @description:
+ */
+data class BackgroundType(var background_type: String = "",var is_logo:Boolean = false)
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 d3103c4..eb85bf7 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
@@ -190,8 +190,6 @@ object ConnManger {
sendLocation()
WsManager.initWebSocket()
-
-
// Settings.toJson()
}
@@ -436,14 +434,15 @@ object ConnManger {
//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() {
@@ -461,13 +460,14 @@ object ConnManger {
* 播放次数到了,发送终止广告指令
*/
fun sendOfflineAd(ad_id:String) {
- val serverUrl = Configurations.config(TaxiApp.instance()).taxiServiceUrl()
- val baseUrl = if (serverUrl.contains("taxihub.cn")){
-// "https://taxihub.cn:2346"
- "http://taxihub.cn:2346"
- } else {
- "https://ledaips.com:2341"
- }
+// val serverUrl = Configurations.config(TaxiApp.instance()).taxiServiceUrl()
+// val baseUrl = if (serverUrl.contains("taxihub.cn")){
+//// "https://taxihub.cn:2346"
+// "http://taxihub.cn:2346"
+// } else {
+// "https://ledaips.com:2341"
+// }
+ val baseUrl = Configurations.config(TaxiApp.instance()).taxiBaseUrl()
KuroExecutor.execute(Runnable {
YoungUtil.YoungLog("sendOfflineAd in MainThread is ${Looper.getMainLooper().thread === Thread.currentThread()}")
val deleteAdvertiseBean = DeleteAdvertiseBean()
@@ -516,13 +516,13 @@ object ConnManger {
* 获取播放的总次数
*/
fun getAdCount(advertise: Advertise){
- val serverUrl = Configurations.config(TaxiApp.instance()).taxiServiceUrl()
- val baseUrl = if (serverUrl.contains("taxihub.cn")){
-// "https://taxihub.cn:2346"
- "http://taxihub.cn:2346"
- } else {
- "https://ledaips.com:2341"
- }
+// val serverUrl = Configurations.config(TaxiApp.instance()).taxiServiceUrl()
+// val baseUrl = if (serverUrl.contains("taxihub.cn")){
+// "http://taxihub.cn:2346"
+// } else {
+// "https://ledaips.com:2341"
+// }
+ val baseUrl = Configurations.config(TaxiApp.instance()).taxiBaseUrl()
//edit by yzd @20211201
//if (Settings.loggerSwitch) {
ThreadUtil.executeBySingleThread(Runnable {
@@ -592,7 +592,9 @@ object ConnManger {
val requestJson: String = if (playLoggers.size < 20) {
ProcessingCommands.gson.toJson(playLoggers)
} else {
- ProcessingCommands.gson.toJson(playLoggers.subList(0, 19))
+// ProcessingCommands.gson.toJson(playLoggers.subList(0, 19))
+ //#edit by ljh @2023/6/5 改成大批量看是否能减小流量消耗
+ ProcessingCommands.gson.toJson(playLoggers)
}
val okHttpClient = OkHttpClient()
@@ -627,9 +629,11 @@ object ConnManger {
// }
if (response.code == 200) {
//#edit by ljh @2023/2/21
- playLoggers.forEach{
- DaoUtil.getPlayLogger().delete(it)
- }
+// playLoggers.forEach{
+// DaoUtil.getPlayLogger().delete(it)
+// }
+ //#edit by ljh @2023/6/5 删除批量上传的日志
+ DaoUtil.getPlayLogger().deleteAll()
}
"删除已上传的日志".logd()
}
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 5b398a9..9b72b23 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
@@ -191,8 +191,7 @@ object ProcessingCommands {
ConnManger.isBindOrTransfer = false
reconnect(1004, "长时间未收到心跳断开连接")
}
-
- },3*60*1000)
+ },4*60*1000)
}
/**
@@ -304,15 +303,42 @@ object ProcessingCommands {
taxiApp.activity?.cancelCustomView()
} else {
when (busInfo.background_type) {
- "route" -> downloadBusInfo(busInfo.media_id, "busLicence", HAOSHENG)
- "brake" -> downloadBusInfo(busInfo.media_id, "turnStop", HAOSHENG)
- "turn_left" -> downloadBusInfo(busInfo.media_id, "turnLeft", HAOSHENG)
- "turn_right" -> downloadBusInfo(busInfo.media_id, "turnRight", HAOSHENG)
- "vacant" -> downloadBusInfo(busInfo.media_id, "vacant", MAIDIER)
- "hired" -> downloadBusInfo(busInfo.media_id, "hired", MAIDIER)
- "no_service" -> downloadBusInfo(busInfo.media_id, "no_service", MAIDIER)
- "booked" -> downloadBusInfo(busInfo.media_id, "booked", MAIDIER)
- "logo" ->downloadBusInfo(busInfo.media_id, "logo", XIXUN)
+ "route" -> {
+ saveBackgroundType("route")
+ downloadBusInfo(busInfo.media_id, "busLicence", HAOSHENG)
+ }
+ "brake" -> {
+ saveBackgroundType("brake")
+ downloadBusInfo(busInfo.media_id, "turnStop", HAOSHENG)
+ }
+ "turn_left" -> {
+ saveBackgroundType("turn_left")
+ downloadBusInfo(busInfo.media_id, "turnLeft", HAOSHENG)
+ }
+ "turn_right" -> {
+ saveBackgroundType("turn_right")
+ downloadBusInfo(busInfo.media_id, "turnRight", HAOSHENG)
+ }
+ "vacant" -> {
+ saveBackgroundType("vacant")
+ downloadBusInfo(busInfo.media_id, "vacant", MAIDIER)
+ }
+ "hired" -> {
+ saveBackgroundType("hired")
+ downloadBusInfo(busInfo.media_id, "hired", MAIDIER)
+ }
+ "no_service" -> {
+ saveBackgroundType("no_service")
+ downloadBusInfo(busInfo.media_id, "no_service", MAIDIER)
+ }
+ "booked" -> {
+ saveBackgroundType("booked")
+ downloadBusInfo(busInfo.media_id, "booked", MAIDIER)
+ }
+ "logo" -> {
+ saveBackgroundType(true)
+ downloadBusInfo(busInfo.media_id, "logo", XIXUN)
+ }
else -> YoungUtil.YoungLog("设置车辆信息 未知type")
}
}
@@ -325,6 +351,38 @@ object ProcessingCommands {
send(response)
}
+ /**
+ * 保存自定义视图类型
+ * @param type String
+ */
+ fun saveBackgroundType(type:String){
+ val gson = Gson()
+ val backgroundTypeJson = Configurations.config(TaxiApp.instance()).backgroundType()
+ val backgroundType = if (backgroundTypeJson.isNotEmpty()){
+ gson.fromJson(backgroundTypeJson)
+ } else {
+ BackgroundType()
+ }
+ backgroundType.background_type = type
+ Configurations.config(TaxiApp.instance()).backgroundTypeSave(gson.toJson(backgroundType))
+ }
+
+ /**
+ * 保存自定义视图类型
+ * @param type String
+ */
+ fun saveBackgroundType(isLogo: Boolean){
+ val gson = Gson()
+ val backgroundTypeJson = Configurations.config(TaxiApp.instance()).backgroundType()
+ val backgroundType = if (backgroundTypeJson.isNotEmpty()){
+ gson.fromJson(backgroundTypeJson)
+ } else {
+ BackgroundType()
+ }
+ backgroundType.is_logo = isLogo
+ Configurations.config(TaxiApp.instance()).backgroundTypeSave(gson.toJson(backgroundType))
+ }
+
private fun setLogWriteEnable(task: String, type: String){
val b = JsonParser().parse(task).asJsonObject.get("turn_on").asBoolean
val taskId = JsonParser().parse(task).asJsonObject.get("task_id").asString
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 22ac919..ef3a233 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
@@ -24,10 +24,10 @@ object WsManager {
private var okHttpClient: OkHttpClient? = null
private var mRequest: Request? = null
-// private const val reconnectTime: Long = 10 * 1000
- private const val reconnectTime: Long = 30 * 1000
- private const val heartbeatTime: Long = 120 * 1000
-// private const val heartbeatTime: Long = 30 * 1000
+ private const val reconnectTime: Long = 10 * 1000
+// private const val reconnectTime: Long = 30 * 1000
+// private const val heartbeatTime: Long = 120 * 1000
+ private const val heartbeatTime: Long = 30 * 1000
private const val sendCurrentAdvertiseTime: Long = 10 *60 * 1000
private val heartbeatContext: String = "beat"
diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/service/RemoteService.kt b/app/src/main/java/cn/trans88/taxiappkotlin/service/RemoteService.kt
new file mode 100644
index 0000000..b5a6751
--- /dev/null
+++ b/app/src/main/java/cn/trans88/taxiappkotlin/service/RemoteService.kt
@@ -0,0 +1,33 @@
+package cn.trans88.taxiappkotlin.service
+
+import android.app.Service
+import android.content.Intent
+import android.os.IBinder
+import cn.trans88.taxiappkotlin.Configurations
+import cn.trans88.taxiappkotlin.TaxiApp
+import cn.trans88.taxiappkotlin.logic.model.BackgroundType
+import com.google.gson.Gson
+import com.xixun.xy.conn.aidl.TaxiAppServer
+
+class RemoteService : Service() {
+
+ val taxiAppServer = object:TaxiAppServer.Stub(){
+ override fun executeJsonCommand(json: String?): String {
+ return "当前taxiApp版本不支持直接走conn,请使用27版本"
+ }
+
+ override fun getBackgroundType(): String {
+ var backgroundTypeJson = Configurations.config(TaxiApp.instance()).backgroundType()
+ if (backgroundTypeJson.isEmpty()){
+ val backgroundType = BackgroundType()
+ backgroundTypeJson = Gson().toJson(backgroundType)
+ }
+ return backgroundTypeJson
+ }
+
+ }
+
+ override fun onBind(intent: Intent): IBinder {
+ return taxiAppServer
+ }
+}
\ No newline at end of file
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 1eae75b..abef96d 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
@@ -100,10 +100,18 @@ class PlayActivity : AppCompatActivity(), NetworkCallback, BusCallback, OnScreen
// }
taxiApp.activity = this
- //默认关闭日志
- "default close log...".logd()
- Configurations.config(this).gpsSwitchSave(false)
- Configurations.config(this).loggerSwitchSave(false)
+
+ val isFirstInstalled = Configurations.config(this).isFirstInstalled
+ if (isFirstInstalled){
+ //升级后打开日志
+ Configurations.config(this).gpsSwitchSave(false)
+ Configurations.config(this).loggerSwitchSave(false)
+ Configurations.config(this).isFirstInstalledSave(false)
+ }
+
+ val loggerSwitch = Configurations.config(this).loggerSwitch()
+ val gpsSwitch = Configurations.config(this).gpsSwitch()
+ "loggerSwitch ------> $loggerSwitch,gpsSwitch -----------> $gpsSwitch".logd()
JoeyDownloadManager.getInstance().setCallBack(this)
diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayView.kt b/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayView.kt
index 643592f..cc1e6d9 100644
--- a/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayView.kt
+++ b/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayView.kt
@@ -332,7 +332,7 @@ fun FrameLayout.playLogo() {
.into(image)
} else {
Glide.with(this)
- .load(R.mipmap.logo)
+ .load(R.mipmap.logo2)
.apply(glideOptions)
.into(image)
}
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 e3153ec..76fccbc 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
@@ -523,13 +523,15 @@ class PlayViewModel(val lifecycle: Lifecycle, private val fl_play: FrameLayout,
} else {
YoungUtil.YoungLog("收到的广告为空停止播放")
-// val advertises = getAdvertise().queryBuilder().orderDesc(Properties.CreateAt).limit(5).list()
-// if (advertises.isNullOrEmpty()){
+ //#edit by ljh @2023/6/28
+ //播放logo问题,播放logo前查一下播放列表是否含有广告
+// val list = getAdvertise().queryBuilder().limit(2).list()
+//// val list = myListMap[Repository.getTestPlayLevels()]
+// "当前是否存有广告:${list?.size}".loge()
+// if (list.isNullOrEmpty()){
// stopPlay()
// } else {
-// "当前播放列表不为空,playList is not null".logd()
-// handler.removeCallbacksAndMessages(null)
-// RefreshPlayer.refresh()
+// refreshAdvertise()
// }
stopPlay()
}
@@ -972,7 +974,7 @@ class PlayViewModel(val lifecycle: Lifecycle, private val fl_play: FrameLayout,
}
}
} else {
- //YoungUtil.YoungLog("当前位置坐标距离上一个点小于50,不记录")
+ YoungUtil.YoungLog("当前位置坐标距离上一个点小于50,不记录")
return
}
} else {
@@ -1029,6 +1031,7 @@ class PlayViewModel(val lifecycle: Lifecycle, private val fl_play: FrameLayout,
this.longitude = longitude
this.latitude = latitude
}
+
YoungUtil.YoungLog("setAdvertiseByPosition adid:${advertise.ad_id}")
advertise.toString().loge()
diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayerRule.kt b/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayerRule.kt
index fb36804..b96359c 100644
--- a/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayerRule.kt
+++ b/app/src/main/java/cn/trans88/taxiappkotlin/ui/play/PlayerRule.kt
@@ -51,7 +51,7 @@ fun Advertise.isReady(): Boolean {
ready = false
}
}else{
- //YoungUtil.YoungLog("${this.pathName}的广告本地不存在,重新下载 ready返回false")
+ YoungUtil.YoungLog("${this.pathName}的广告本地不存在,重新下载 ready返回false")
file.delete()
val advertise = getAdvertise().queryBuilder().where(Properties.Ad_id.eq(this.ad_id)).unique()
if (advertise != null){
diff --git a/app/src/main/res/mipmap-mdpi/logo2.jpg b/app/src/main/res/mipmap-mdpi/logo2.jpg
new file mode 100644
index 0000000..87db084
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/logo2.jpg differ
diff --git a/build/intermediates/lint-cache/sdk-registry.xml/sdk-registry.xml b/build/intermediates/lint-cache/sdk-registry.xml/sdk-registry.xml
new file mode 100644
index 0000000..2b099a4
--- /dev/null
+++ b/build/intermediates/lint-cache/sdk-registry.xml/sdk-registry.xml
@@ -0,0 +1,195 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/debug/TaxiApp_v3.3.3-26-5.8-debug{162}.apk b/debug/TaxiApp_v3.3.3-26-5.8-debug{162}.apk
deleted file mode 100644
index 2a0bdec..0000000
Binary files a/debug/TaxiApp_v3.3.3-26-5.8-debug{162}.apk and /dev/null differ
diff --git a/debug/TaxiApp_v3.3.3-26-5.9-debug{163}.apk b/debug/TaxiApp_v3.3.3-26-5.9-debug{163}.apk
deleted file mode 100644
index eccbec4..0000000
Binary files a/debug/TaxiApp_v3.3.3-26-5.9-debug{163}.apk and /dev/null differ
diff --git a/debug/TaxiApp_v3.3.3-26debug{150}.apk b/debug/TaxiApp_v3.3.3-26debug{150}.apk
deleted file mode 100644
index 71659e8..0000000
Binary files a/debug/TaxiApp_v3.3.3-26debug{150}.apk and /dev/null differ
diff --git a/debug/TaxiApp_v3.3.3-26debug{173}.apk b/debug/TaxiApp_v3.3.3-26debug{173}.apk
deleted file mode 100644
index 59e660e..0000000
Binary files a/debug/TaxiApp_v3.3.3-26debug{173}.apk and /dev/null differ
diff --git a/debug/output.json b/debug/output.json
new file mode 100644
index 0000000..21f0411
--- /dev/null
+++ b/debug/output.json
@@ -0,0 +1 @@
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":187,"versionName":"3.3.3-beta26.3.3.8.2-debug","enabled":true,"outputFile":"TaxiApp_v3.3.3-beta26.3.3.8.2-debug{187}.apk","fullName":"debug","baseName":"debug","dirName":""},"path":"TaxiApp_v3.3.3-beta26.3.3.8.2-debug{187}.apk","properties":{}}]
\ No newline at end of file
diff --git a/local.properties b/local.properties
index 86fffdf..35c7c57 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.
-#Tue Apr 18 13:34:15 GMT+08:00 2023
+#Wed Jun 28 13:44:25 GMT+08:00 2023
sdk.dir=D\:\\Android\\sdk
diff --git a/debug/TaxiApp_v3.3.3-26-5.7-debug{161}.apk b/release/TaxiApp_v3.3.3-beta26.3.4.2-release{179}.apk
similarity index 53%
rename from debug/TaxiApp_v3.3.3-26-5.7-debug{161}.apk
rename to release/TaxiApp_v3.3.3-beta26.3.4.2-release{179}.apk
index 17a6ef3..0add826 100644
Binary files a/debug/TaxiApp_v3.3.3-26-5.7-debug{161}.apk and b/release/TaxiApp_v3.3.3-beta26.3.4.2-release{179}.apk differ
diff --git a/release/output.json b/release/output.json
index 6fde2a8..82e3dea 100644
--- a/release/output.json
+++ b/release/output.json
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":178,"versionName":"3.3.3-beta26.3.5-release","enabled":true,"outputFile":"TaxiApp_v3.3.3-beta26.3.5-release{178}.apk","fullName":"release","baseName":"release","dirName":""},"path":"TaxiApp_v3.3.3-beta26.3.5-release{178}.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":188,"versionName":"3.3.3-beta26.3.3.8.3-release","enabled":true,"outputFile":"TaxiApp_v3.3.3-beta26.3.3.8.3-release{188}.apk","fullName":"release","baseName":"release","dirName":""},"path":"TaxiApp_v3.3.3-beta26.3.3.8.3-release{188}.apk","properties":{}}]
\ No newline at end of file