新增软解码切换功能

This commit is contained in:
刘金华 2024-03-20 10:19:51 +08:00
parent 12c46700d6
commit 1c2cdacadb
61 changed files with 1449 additions and 164 deletions

View File

@ -1,2 +1,2 @@
#Thu Sep 14 18:07:54 GMT+08:00 2023
#Mon Mar 04 15:33:52 GMT+08:00 2024
gradle.version=5.6.4

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
<bytecodeTargetLevel target="1.8" />
</component>
</project>

View File

@ -19,6 +19,12 @@
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/000d0a739247410c745f8b5cfc291dbb/jetified-debug-db-base-1.0.6/AndroidManifest.xml" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/000d0a739247410c745f8b5cfc291dbb/jetified-debug-db-base-1.0.6/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/000d0a739247410c745f8b5cfc291dbb/jetified-debug-db-base-1.0.6/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/4ddbfcbe0013ceaa7e5a6631cd5f6ef5/jetified-debug-db-base-1.0.6/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/4ddbfcbe0013ceaa7e5a6631cd5f6ef5/jetified-debug-db-base-1.0.6/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/4ddbfcbe0013ceaa7e5a6631cd5f6ef5/jetified-debug-db-base-1.0.6/AndroidManifest.xml" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/e310a8b89f2d8ba2f75dc3a1729e8b2a/jetified-debug-db-base-1.0.6/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/e310a8b89f2d8ba2f75dc3a1729e8b2a/jetified-debug-db-base-1.0.6/AndroidManifest.xml" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/e310a8b89f2d8ba2f75dc3a1729e8b2a/jetified-debug-db-base-1.0.6/jars/classes.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.amitshekhar.android/debug-db-base/1.0.6/43c6abb777258b8e02b7a4f4aef44f5996ddf30f/debug-db-base-1.0.6-javadoc.jar!/" />

View File

@ -0,0 +1,15 @@
<component name="libraryTable">
<library name="Gradle: com.andkulikov:transitionseverywhere:2.0.0-beta01@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/10ea8aa4f6e092ff2f55dabcec7eb0a9/jetified-transitionseverywhere-2.0.0-beta01/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/10ea8aa4f6e092ff2f55dabcec7eb0a9/jetified-transitionseverywhere-2.0.0-beta01/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/10ea8aa4f6e092ff2f55dabcec7eb0a9/jetified-transitionseverywhere-2.0.0-beta01/AndroidManifest.xml" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.andkulikov/transitionseverywhere/2.0.0-beta01/1cc96719538e8a0d18a71d74a3c998e3df9228e9/transitionseverywhere-2.0.0-beta01-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.andkulikov/transitionseverywhere/2.0.0-beta01/3d8df039674a1e242e675f386b2dd65f7d9f1625/transitionseverywhere-2.0.0-beta01-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -7,6 +7,8 @@
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/ad36d5a34233c7fa29ad3770971d35c6/jetified-stetho-1.5.1/annotations.zip!/" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/4d8a2b6516214c37dd58d58e9a7f5172/jetified-stetho-1.5.1/annotations.zip!/" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/083aec472dafcfc3b0c0d766cd43b137/jetified-stetho-1.5.1/annotations.zip!/" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/887f6708c215f50988e88d72cdabde59/jetified-stetho-1.5.1/annotations.zip!/" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/cccd8aa5fc5dd56698cef82da605b812/jetified-stetho-1.5.1/annotations.zip!/" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/d20b09848ce936fd0a38f787548625fb/jetified-stetho-1.5.1/jars/classes.jar!/" />
@ -27,6 +29,12 @@
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/083aec472dafcfc3b0c0d766cd43b137/jetified-stetho-1.5.1/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/083aec472dafcfc3b0c0d766cd43b137/jetified-stetho-1.5.1/AndroidManifest.xml" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/083aec472dafcfc3b0c0d766cd43b137/jetified-stetho-1.5.1/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/887f6708c215f50988e88d72cdabde59/jetified-stetho-1.5.1/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/887f6708c215f50988e88d72cdabde59/jetified-stetho-1.5.1/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/887f6708c215f50988e88d72cdabde59/jetified-stetho-1.5.1/AndroidManifest.xml" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/cccd8aa5fc5dd56698cef82da605b812/jetified-stetho-1.5.1/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/cccd8aa5fc5dd56698cef82da605b812/jetified-stetho-1.5.1/AndroidManifest.xml" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/cccd8aa5fc5dd56698cef82da605b812/jetified-stetho-1.5.1/res" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.facebook.stetho/stetho/1.5.1/b71856fcb682e807ccec3a276e47c94944b6c6ea/stetho-1.5.1-javadoc.jar!/" />

View File

@ -19,6 +19,12 @@
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/7f2036a595ce5b219144e3375ddac139/jetified-GreenDaoUpgradeHelper-v2.2.1/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/7f2036a595ce5b219144e3375ddac139/jetified-GreenDaoUpgradeHelper-v2.2.1/AndroidManifest.xml" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/7f2036a595ce5b219144e3375ddac139/jetified-GreenDaoUpgradeHelper-v2.2.1/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/19787c79412530f7cf41ba98e3cf4503/jetified-GreenDaoUpgradeHelper-v2.2.1/AndroidManifest.xml" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/19787c79412530f7cf41ba98e3cf4503/jetified-GreenDaoUpgradeHelper-v2.2.1/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/19787c79412530f7cf41ba98e3cf4503/jetified-GreenDaoUpgradeHelper-v2.2.1/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/0b4a4104fa2fea365d8bad6f5dfd0a29/jetified-GreenDaoUpgradeHelper-v2.2.1/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/0b4a4104fa2fea365d8bad6f5dfd0a29/jetified-GreenDaoUpgradeHelper-v2.2.1/AndroidManifest.xml" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/0b4a4104fa2fea365d8bad6f5dfd0a29/jetified-GreenDaoUpgradeHelper-v2.2.1/jars/classes.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.github.yuweiguocn/GreenDaoUpgradeHelper/v2.2.1/7aef2e7b4c18afb240f0e17af5d045f176d2b8ef/GreenDaoUpgradeHelper-v2.2.1-javadoc.jar!/" />

View File

@ -0,0 +1,15 @@
<component name="libraryTable">
<library name="Gradle: com.google.android.exoplayer:exoplayer:r1.5.11@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/790c62dbd20241bc524dd54d3ef19633/jetified-exoplayer-r1.5.11/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/790c62dbd20241bc524dd54d3ef19633/jetified-exoplayer-r1.5.11/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/790c62dbd20241bc524dd54d3ef19633/jetified-exoplayer-r1.5.11/AndroidManifest.xml" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.android.exoplayer/exoplayer/r1.5.11/51c6408ed7fb546c19d6b6f5c8b21d3a559842f1/exoplayer-r1.5.11-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.android.exoplayer/exoplayer/r1.5.11/5bb43348bca48bf6567a206024acdbcb23f4a990/exoplayer-r1.5.11-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Gradle: com.jakewharton:disklrucache:2.0.2">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jakewharton/disklrucache/2.0.2/93b399470e72c0bc8cb52379943b63c9aa586cd8/disklrucache-2.0.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jakewharton/disklrucache/2.0.2/a0405f093a7fa9000f68ba5a8db11f4a01d827d9/disklrucache-2.0.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jakewharton/disklrucache/2.0.2/a8b600c9a1d9f75cdc45bb1b24b4731845a7658b/disklrucache-2.0.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -19,6 +19,12 @@
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/ad5dbc95019bd8e49004e8b34c57b5cc/jetified-logger-2.2.0/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/ad5dbc95019bd8e49004e8b34c57b5cc/jetified-logger-2.2.0/AndroidManifest.xml" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/ad5dbc95019bd8e49004e8b34c57b5cc/jetified-logger-2.2.0/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/3c61309d95eba32c83569838bd6eb73d/jetified-logger-2.2.0/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/3c61309d95eba32c83569838bd6eb73d/jetified-logger-2.2.0/AndroidManifest.xml" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/3c61309d95eba32c83569838bd6eb73d/jetified-logger-2.2.0/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/94dd3650c1dd350610ff6179bb68c164/jetified-logger-2.2.0/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/94dd3650c1dd350610ff6179bb68c164/jetified-logger-2.2.0/AndroidManifest.xml" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/94dd3650c1dd350610ff6179bb68c164/jetified-logger-2.2.0/jars/classes.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.orhanobut/logger/2.2.0/98e69754ab23f7179137d8d2a0e3eea79200d746/logger-2.2.0-javadoc.jar!/" />

View File

@ -0,0 +1,15 @@
<component name="libraryTable">
<library name="Gradle: com.shuyu:gsyVideoPlayer-arm64:8.1.2@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/0a8bc628c5c2b59e5803dd252d230c69/jetified-gsyVideoPlayer-arm64-8.1.2/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/0a8bc628c5c2b59e5803dd252d230c69/jetified-gsyVideoPlayer-arm64-8.1.2/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/0a8bc628c5c2b59e5803dd252d230c69/jetified-gsyVideoPlayer-arm64-8.1.2/AndroidManifest.xml" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyVideoPlayer-arm64/8.1.2/c6f27a359eb8fe4c2d26e0c786323ff027204ba7/gsyVideoPlayer-arm64-8.1.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyVideoPlayer-arm64/8.1.2/4d37565f790e60f0d875452224f40cfd8a050be2/gsyVideoPlayer-arm64-8.1.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,15 @@
<component name="libraryTable">
<library name="Gradle: com.shuyu:gsyVideoPlayer-armv5:8.1.2@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/b360dda17d7d2dabffa05706dc38e9c5/jetified-gsyVideoPlayer-armv5-8.1.2/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/b360dda17d7d2dabffa05706dc38e9c5/jetified-gsyVideoPlayer-armv5-8.1.2/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/b360dda17d7d2dabffa05706dc38e9c5/jetified-gsyVideoPlayer-armv5-8.1.2/AndroidManifest.xml" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyVideoPlayer-armv5/8.1.2/80149f6a5bf76ba29c8067173600f6d1b3607ca2/gsyVideoPlayer-armv5-8.1.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyVideoPlayer-armv5/8.1.2/4d9b627b40d7ac32c2a4f165fcef0707787dfc81/gsyVideoPlayer-armv5-8.1.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,15 @@
<component name="libraryTable">
<library name="Gradle: com.shuyu:gsyVideoPlayer-armv7a:8.1.2@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/1a0615481ecb85d0cb83348dd9df58dc/jetified-gsyVideoPlayer-armv7a-8.1.2/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/1a0615481ecb85d0cb83348dd9df58dc/jetified-gsyVideoPlayer-armv7a-8.1.2/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/1a0615481ecb85d0cb83348dd9df58dc/jetified-gsyVideoPlayer-armv7a-8.1.2/AndroidManifest.xml" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyVideoPlayer-armv7a/8.1.2/cd1b87b0f3c507abd5b9e51da344b590af1141c1/gsyVideoPlayer-armv7a-8.1.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyVideoPlayer-armv7a/8.1.2/3ccfc3d7981f9a925a069db589a1450857144386/gsyVideoPlayer-armv7a-8.1.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,15 @@
<component name="libraryTable">
<library name="Gradle: com.shuyu:gsyVideoPlayer-base:8.1.2@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/2b3dc07e55269a31ad24bd8b19352261/jetified-gsyVideoPlayer-base-8.1.2/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/2b3dc07e55269a31ad24bd8b19352261/jetified-gsyVideoPlayer-base-8.1.2/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/2b3dc07e55269a31ad24bd8b19352261/jetified-gsyVideoPlayer-base-8.1.2/AndroidManifest.xml" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyVideoPlayer-base/8.1.2/d8d7811290044edab5f9070bbdd0926044ff404c/gsyVideoPlayer-base-8.1.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyVideoPlayer-base/8.1.2/5767ca223e495bf5ef9630a4f4d172ab64eb0665/gsyVideoPlayer-base-8.1.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,15 @@
<component name="libraryTable">
<library name="Gradle: com.shuyu:gsyVideoPlayer-java:8.1.2@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/991b63861e192385d2a45317518c9ae6/jetified-gsyVideoPlayer-java-8.1.2/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/991b63861e192385d2a45317518c9ae6/jetified-gsyVideoPlayer-java-8.1.2/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/991b63861e192385d2a45317518c9ae6/jetified-gsyVideoPlayer-java-8.1.2/AndroidManifest.xml" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyVideoPlayer-java/8.1.2/42f025c9609037f4ea2c63721987c6df76c1e06/gsyVideoPlayer-java-8.1.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyVideoPlayer-java/8.1.2/908aad69d136a466aa392a45ddd5c17ae8126946/gsyVideoPlayer-java-8.1.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,15 @@
<component name="libraryTable">
<library name="Gradle: com.shuyu:gsyVideoPlayer-x64:8.1.2@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/5eae8ee142e4c872b46a2bed9193c2fd/jetified-gsyVideoPlayer-x64-8.1.2/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/5eae8ee142e4c872b46a2bed9193c2fd/jetified-gsyVideoPlayer-x64-8.1.2/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/5eae8ee142e4c872b46a2bed9193c2fd/jetified-gsyVideoPlayer-x64-8.1.2/AndroidManifest.xml" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyVideoPlayer-x64/8.1.2/8862c43f4332e5a59c532a69d568dc5be87abaa5/gsyVideoPlayer-x64-8.1.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyVideoPlayer-x64/8.1.2/dd3ead2ad18092a247a25f6d719b162b0a65be23/gsyVideoPlayer-x64-8.1.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,15 @@
<component name="libraryTable">
<library name="Gradle: com.shuyu:gsyVideoPlayer-x86:8.1.2@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/9629325aebcbe5ec806a7df2072bba58/jetified-gsyVideoPlayer-x86-8.1.2/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/9629325aebcbe5ec806a7df2072bba58/jetified-gsyVideoPlayer-x86-8.1.2/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/9629325aebcbe5ec806a7df2072bba58/jetified-gsyVideoPlayer-x86-8.1.2/AndroidManifest.xml" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyVideoPlayer-x86/8.1.2/4f26ab09538d4ccbbda6eb3eb70eea1ebe52f9c8/gsyVideoPlayer-x86-8.1.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyVideoPlayer-x86/8.1.2/6fb69f7cfcd70a9d16c27983f775c545aff09035/gsyVideoPlayer-x86-8.1.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,15 @@
<component name="libraryTable">
<library name="Gradle: com.shuyu:gsyvideoplayer-androidvideocache:8.1.2@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/0a94de07336996d2e58928d8758c5c0e/jetified-gsyvideoplayer-androidvideocache-8.1.2/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/0a94de07336996d2e58928d8758c5c0e/jetified-gsyvideoplayer-androidvideocache-8.1.2/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/0a94de07336996d2e58928d8758c5c0e/jetified-gsyvideoplayer-androidvideocache-8.1.2/AndroidManifest.xml" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyvideoplayer-androidvideocache/8.1.2/f3a37151911860bd9c81de39aa5cdbb062fc096a/gsyvideoplayer-androidvideocache-8.1.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.shuyu/gsyvideoplayer-androidvideocache/8.1.2/f0094ffb27578e8850fc573b52af6624948ad744/gsyvideoplayer-androidvideocache-8.1.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,15 @@
<component name="libraryTable">
<library name="Gradle: com.zhouyou:rxeasyhttp:2.1.5@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/7af653fe83e0e90c9b7886840ceae684/jetified-rxeasyhttp-2.1.5/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/7af653fe83e0e90c9b7886840ceae684/jetified-rxeasyhttp-2.1.5/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/7af653fe83e0e90c9b7886840ceae684/jetified-rxeasyhttp-2.1.5/AndroidManifest.xml" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.zhouyou/rxeasyhttp/2.1.5/7a0a1d0738c5f8c0a5286cc09e929e5cf7667954/rxeasyhttp-2.1.5-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.zhouyou/rxeasyhttp/2.1.5/6e05ef8e11293e988d7e27bf8228dd3e1d6efb53/rxeasyhttp-2.1.5-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: tv.danmaku.ijk.media:ijkplayer-exo:0.8.8@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/42d9a1858575c38fe01b9ac6560613d1/jetified-ijkplayer-exo-0.8.8/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/42d9a1858575c38fe01b9ac6560613d1/jetified-ijkplayer-exo-0.8.8/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/42d9a1858575c38fe01b9ac6560613d1/jetified-ijkplayer-exo-0.8.8/AndroidManifest.xml" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: tv.danmaku.ijk.media:ijkplayer-java:0.8.8@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/97d6ec940fa9fe8f3f7d9f6c67d24115/jetified-ijkplayer-java-0.8.8/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/97d6ec940fa9fe8f3f7d9f6c67d24115/jetified-ijkplayer-java-0.8.8/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/97d6ec940fa9fe8f3f7d9f6c67d24115/jetified-ijkplayer-java-0.8.8/AndroidManifest.xml" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -9,7 +9,7 @@
</map>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

File diff suppressed because one or more lines are too long

View File

@ -88,10 +88,10 @@
<library name="Gradle: kaptGeneratedClasses">
<CLASSES>
<root url="file://$MODULE_DIR$/../../../kurolibrary/build/tmp/kapt3/classes/debugAndroidTest" />
<root url="file://$MODULE_DIR$/../../../kurolibrary/build/tmp/kapt3/classes/release" />
<root url="file://$MODULE_DIR$/../../../kurolibrary/build/tmp/kapt3/classes/debugUnitTest" />
<root url="file://$MODULE_DIR$/../../../kurolibrary/build/tmp/kapt3/classes/debug" />
<root url="file://$MODULE_DIR$/../../../kurolibrary/build/tmp/kapt3/classes/releaseUnitTest" />
<root url="file://$MODULE_DIR$/../../../kurolibrary/build/tmp/kapt3/classes/release" />
</CLASSES>
<JAVADOC />
<SOURCES />

View File

@ -89,11 +89,11 @@
<orderEntry type="module-library">
<library name="Gradle: kaptGeneratedClasses">
<CLASSES>
<root url="file://$MODULE_DIR$/../../../kurotool/build/tmp/kapt3/classes/release" />
<root url="file://$MODULE_DIR$/../../../kurotool/build/tmp/kapt3/classes/releaseUnitTest" />
<root url="file://$MODULE_DIR$/../../../kurotool/build/tmp/kapt3/classes/debugAndroidTest" />
<root url="file://$MODULE_DIR$/../../../kurotool/build/tmp/kapt3/classes/debug" />
<root url="file://$MODULE_DIR$/../../../kurotool/build/tmp/kapt3/classes/debugUnitTest" />
<root url="file://$MODULE_DIR$/../../../kurotool/build/tmp/kapt3/classes/releaseUnitTest" />
<root url="file://$MODULE_DIR$/../../../kurotool/build/tmp/kapt3/classes/release" />
<root url="file://$MODULE_DIR$/../../../kurotool/build/tmp/kapt3/classes/debug" />
<root url="file://$MODULE_DIR$/../../../kurotool/build/tmp/kapt3/classes/debugAndroidTest" />
</CLASSES>
<JAVADOC />
<SOURCES />

View File

@ -21,8 +21,8 @@ android {
applicationId "net.sysolution.taxiapp"
minSdkVersion 21
targetSdkVersion 29
versionCode 244
versionName "3.3.3-beta26.4.0.1-release"
versionCode 249
versionName "3.3.3-beta26.4.0.8-debug"
//alphaxx - ,bug
//Betaxx -
@ -60,7 +60,9 @@ android {
26.3.9.96 广
26.3.9.98 taxiApp当天的运行时间
26.3.9.99
广
广z繁切换会出现黑屏问题
3.3.3-beta26.4.0.6-release GPS,
3.3.3-beta26.4.0.7-release GPS上报2502508
**/
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@ -113,7 +115,7 @@ android {
//
greendao {
schemaVersion 44
schemaVersion 46
daoPackage 'cn.trans88.taxiappkotlin.logic.dao'
targetGenDir 'src/main/java'
}
@ -207,4 +209,14 @@ dependencies {
// implementation 'com.google.android.exoplayer:exoplayer-ui:2.14.2'
// implementation 'com.github.Trans88:KuroLibrary:0.1.3'
implementation 'com.zhouyou:rxeasyhttp:2.1.5'
implementation 'com.shuyu:gsyVideoPlayer-java:8.1.2'
//ijk模式的so
implementation 'com.shuyu:gsyVideoPlayer-armv5:8.1.2'
implementation 'com.shuyu:gsyVideoPlayer-armv7a:8.1.2'
implementation 'com.shuyu:gsyVideoPlayer-arm64:8.1.2'
implementation 'com.shuyu:gsyVideoPlayer-x64:8.1.2'
implementation 'com.shuyu:gsyVideoPlayer-x86:8.1.2'
}

View File

@ -351,6 +351,18 @@ public class Configurations {
context.getSharedPreferences("config", Context.MODE_PRIVATE).edit().putBoolean("isCustomLogo", b).apply();
}
/**
* 是否使用软解码
* @return
*/
public boolean isSoftDecode(){
return context.getSharedPreferences("config", Context.MODE_PRIVATE).getBoolean("isSoftDecode", false);
}
public void isSoftDecodeSave(Boolean b){
context.getSharedPreferences("config", Context.MODE_PRIVATE).edit().putBoolean("isSoftDecode", b).apply();
}
/**
* taxiApp开始运行时间
* @return
@ -375,16 +387,28 @@ public class Configurations {
context.getSharedPreferences("config", Context.MODE_PRIVATE).edit().putLong("endRunTime", startTime).apply();
}
/**
* taxiApp每次启动的总运行时间
* @return
*/
public Long sumRunTime(){
return context.getSharedPreferences("config", Context.MODE_PRIVATE).getLong("sumRunTime",0);
}
public void sumRunTimeSave(long runtime){
context.getSharedPreferences("config", Context.MODE_PRIVATE).edit().putLong("sumRunTime", runtime).apply();
}
/**
* taxiApp当天总的运行时间
* @return
*/
public long sumRunTime(){
return context.getSharedPreferences("config", Context.MODE_PRIVATE).getLong("sumRunTime",0L);
public Long todaySumRunTime(){
return context.getSharedPreferences("config", Context.MODE_PRIVATE).getLong("todaySumRunTime",0);
}
public void sumRunTimeSave(Long startTime){
context.getSharedPreferences("config", Context.MODE_PRIVATE).edit().putLong("sumRunTime", startTime).apply();
public void todaySumRunTimeSave(long runtime){
context.getSharedPreferences("config", Context.MODE_PRIVATE).edit().putLong("todaySumRunTime", runtime).apply();
}
public String runtimeJsonString(){

View File

@ -26,9 +26,14 @@ import cn.trans88.taxiappkotlin.util.KuroTimer
import cn.trans88.taxiappkotlin.util.YoungUtil
import com.facebook.stetho.Stetho
import com.google.gson.Gson
import com.shuyu.gsyvideoplayer.player.IjkPlayerManager
import com.shuyu.gsyvideoplayer.player.PlayerFactory
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
import com.trs88.kurolibrary.log.*
import com.trs88.kurolibrary.restful.retrofit.KuroApiFactory
import com.zhouyou.http.EasyHttp
import io.reactivex.plugins.RxJavaPlugins
import tv.danmaku.ijk.media.player.IjkMediaPlayer
import java.io.*
import java.util.*
import java.util.concurrent.CopyOnWriteArrayList
@ -81,6 +86,9 @@ class TaxiApp:Application() {
var isPositionRefresh = false
//是否软解码
var isSoftDecode = false
companion object{
private var instance:Application? =null
fun instance() = instance!!
@ -115,12 +123,18 @@ class TaxiApp:Application() {
override fun onCreate() {
super.onCreate()
instance = this
PlayerFactory.setPlayManager(IjkPlayerManager::class.java) //ijk模式
GSYVideoType.setShowType(GSYVideoType.SCREEN_MATCH_FULL)
//关闭IJK日志
IjkPlayerManager.setLogLevel(IjkMediaPlayer.IJK_LOG_SILENT)
val helperDaoDB = HelperDaoDB(this, "taxi-app-database.db", null)
val db = helperDaoDB.writableDatabase
daoMaster = DaoMaster(db)
daoSession = daoMaster.newSession()
EasyHttp.init(this)
//add by yzd @20211130 用config替换原有的配置文件
Configurations.config(this).init();
//初始化异常捕捉 //yzd 注释于20211110

View File

@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* Master of DAO (schema version 44): knows all DAOs.
* Master of DAO (schema version 46): knows all DAOs.
*/
public class DaoMaster extends AbstractDaoMaster {
public static final int SCHEMA_VERSION = 44;
public static final int SCHEMA_VERSION = 46;
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
@ -29,6 +29,7 @@ public class DaoMaster extends AbstractDaoMaster {
PlayLoggerDao.createTable(db, ifNotExists);
PositionAdvertiseDao.createTable(db, ifNotExists);
RegionsDao.createTable(db, ifNotExists);
RunTimeDataDao.createTable(db, ifNotExists);
SanleAdvertiseDao.createTable(db, ifNotExists);
ScheduleDao.createTable(db, ifNotExists);
SectionDao.createTable(db, ifNotExists);
@ -46,6 +47,7 @@ public class DaoMaster extends AbstractDaoMaster {
PlayLoggerDao.dropTable(db, ifExists);
PositionAdvertiseDao.dropTable(db, ifExists);
RegionsDao.dropTable(db, ifExists);
RunTimeDataDao.dropTable(db, ifExists);
SanleAdvertiseDao.dropTable(db, ifExists);
ScheduleDao.dropTable(db, ifExists);
SectionDao.dropTable(db, ifExists);
@ -77,6 +79,7 @@ public class DaoMaster extends AbstractDaoMaster {
registerDaoClass(PlayLoggerDao.class);
registerDaoClass(PositionAdvertiseDao.class);
registerDaoClass(RegionsDao.class);
registerDaoClass(RunTimeDataDao.class);
registerDaoClass(SanleAdvertiseDao.class);
registerDaoClass(ScheduleDao.class);
registerDaoClass(SectionDao.class);

View File

@ -16,6 +16,7 @@ import cn.trans88.taxiappkotlin.logic.model.Order;
import cn.trans88.taxiappkotlin.logic.model.PlayLogger;
import cn.trans88.taxiappkotlin.logic.model.PositionAdvertise;
import cn.trans88.taxiappkotlin.logic.model.Regions;
import cn.trans88.taxiappkotlin.logic.model.RunTimeData;
import cn.trans88.taxiappkotlin.logic.model.SanleAdvertise;
import cn.trans88.taxiappkotlin.logic.model.Schedule;
import cn.trans88.taxiappkotlin.logic.model.Section;
@ -30,6 +31,7 @@ import cn.trans88.taxiappkotlin.logic.dao.OrderDao;
import cn.trans88.taxiappkotlin.logic.dao.PlayLoggerDao;
import cn.trans88.taxiappkotlin.logic.dao.PositionAdvertiseDao;
import cn.trans88.taxiappkotlin.logic.dao.RegionsDao;
import cn.trans88.taxiappkotlin.logic.dao.RunTimeDataDao;
import cn.trans88.taxiappkotlin.logic.dao.SanleAdvertiseDao;
import cn.trans88.taxiappkotlin.logic.dao.ScheduleDao;
import cn.trans88.taxiappkotlin.logic.dao.SectionDao;
@ -53,6 +55,7 @@ public class DaoSession extends AbstractDaoSession {
private final DaoConfig playLoggerDaoConfig;
private final DaoConfig positionAdvertiseDaoConfig;
private final DaoConfig regionsDaoConfig;
private final DaoConfig runTimeDataDaoConfig;
private final DaoConfig sanleAdvertiseDaoConfig;
private final DaoConfig scheduleDaoConfig;
private final DaoConfig sectionDaoConfig;
@ -67,6 +70,7 @@ public class DaoSession extends AbstractDaoSession {
private final PlayLoggerDao playLoggerDao;
private final PositionAdvertiseDao positionAdvertiseDao;
private final RegionsDao regionsDao;
private final RunTimeDataDao runTimeDataDao;
private final SanleAdvertiseDao sanleAdvertiseDao;
private final ScheduleDao scheduleDao;
private final SectionDao sectionDao;
@ -101,6 +105,9 @@ public class DaoSession extends AbstractDaoSession {
regionsDaoConfig = daoConfigMap.get(RegionsDao.class).clone();
regionsDaoConfig.initIdentityScope(type);
runTimeDataDaoConfig = daoConfigMap.get(RunTimeDataDao.class).clone();
runTimeDataDaoConfig.initIdentityScope(type);
sanleAdvertiseDaoConfig = daoConfigMap.get(SanleAdvertiseDao.class).clone();
sanleAdvertiseDaoConfig.initIdentityScope(type);
@ -124,6 +131,7 @@ public class DaoSession extends AbstractDaoSession {
playLoggerDao = new PlayLoggerDao(playLoggerDaoConfig, this);
positionAdvertiseDao = new PositionAdvertiseDao(positionAdvertiseDaoConfig, this);
regionsDao = new RegionsDao(regionsDaoConfig, this);
runTimeDataDao = new RunTimeDataDao(runTimeDataDaoConfig, this);
sanleAdvertiseDao = new SanleAdvertiseDao(sanleAdvertiseDaoConfig, this);
scheduleDao = new ScheduleDao(scheduleDaoConfig, this);
sectionDao = new SectionDao(sectionDaoConfig, this);
@ -138,6 +146,7 @@ public class DaoSession extends AbstractDaoSession {
registerDao(PlayLogger.class, playLoggerDao);
registerDao(PositionAdvertise.class, positionAdvertiseDao);
registerDao(Regions.class, regionsDao);
registerDao(RunTimeData.class, runTimeDataDao);
registerDao(SanleAdvertise.class, sanleAdvertiseDao);
registerDao(Schedule.class, scheduleDao);
registerDao(Section.class, sectionDao);
@ -154,6 +163,7 @@ public class DaoSession extends AbstractDaoSession {
playLoggerDaoConfig.clearIdentityScope();
positionAdvertiseDaoConfig.clearIdentityScope();
regionsDaoConfig.clearIdentityScope();
runTimeDataDaoConfig.clearIdentityScope();
sanleAdvertiseDaoConfig.clearIdentityScope();
scheduleDaoConfig.clearIdentityScope();
sectionDaoConfig.clearIdentityScope();
@ -193,6 +203,10 @@ public class DaoSession extends AbstractDaoSession {
return regionsDao;
}
public RunTimeDataDao getRunTimeDataDao() {
return runTimeDataDao;
}
public SanleAdvertiseDao getSanleAdvertiseDao() {
return sanleAdvertiseDao;
}

View File

@ -23,6 +23,7 @@ object DaoUtil {
private var mScheduleDao:ScheduleDao
private var mRegionsDao:RegionsDao
private var mContainerDao:ContainerDao
private var mRunTimeDataDao:RunTimeDataDao
init {
// helperDaoDB = HelperDaoDB(TaxiApp.instance(), DB_NAME, null)
@ -39,6 +40,7 @@ object DaoUtil {
mScheduleDao = daoSession.scheduleDao
mRegionsDao = daoSession.regionsDao
mContainerDao = daoSession.containerDao
mRunTimeDataDao = daoSession.runTimeDataDao
}
@Synchronized
@ -82,6 +84,11 @@ object DaoUtil {
return mSanleAdvertiseDao
}
@Synchronized
fun getRunTimeDao(): RunTimeDataDao {
return mRunTimeDataDao
}
@Synchronized
fun getPositionAdvertise(): PositionAdvertiseDao = mPositionAdvertiseDao
@ -203,4 +210,11 @@ object DaoUtil {
}
}
/**
* 删除已上传的运行时长数据
*/
fun deleteIsUpRunTimeData(){
getRunTimeDao().queryBuilder().where(RunTimeDataDao.Properties.IsUpload.eq(1)).buildDelete().executeDeleteWithoutDetachingEntities()
}
}

View File

@ -0,0 +1,171 @@
package cn.trans88.taxiappkotlin.logic.dao;
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
import org.greenrobot.greendao.internal.DaoConfig;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseStatement;
import cn.trans88.taxiappkotlin.logic.model.RunTimeData;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "RUN_TIME_DATA".
*/
public class RunTimeDataDao extends AbstractDao<RunTimeData, Long> {
public static final String TABLENAME = "RUN_TIME_DATA";
/**
* Properties of entity RunTimeData.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property AutoId = new Property(0, Long.class, "autoId", true, "_id");
public final static Property CardId = new Property(1, String.class, "cardId", false, "CARD_ID");
public final static Property SumRuntime = new Property(2, Long.class, "sumRuntime", false, "SUM_RUNTIME");
public final static Property StartRuntime = new Property(3, Long.class, "startRuntime", false, "START_RUNTIME");
public final static Property IsUpload = new Property(4, Integer.class, "isUpload", false, "IS_UPLOAD");
}
public RunTimeDataDao(DaoConfig config) {
super(config);
}
public RunTimeDataDao(DaoConfig config, DaoSession daoSession) {
super(config, daoSession);
}
/** Creates the underlying database table. */
public static void createTable(Database db, boolean ifNotExists) {
String constraint = ifNotExists? "IF NOT EXISTS ": "";
db.execSQL("CREATE TABLE " + constraint + "\"RUN_TIME_DATA\" (" + //
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: autoId
"\"CARD_ID\" TEXT," + // 1: cardId
"\"SUM_RUNTIME\" INTEGER," + // 2: sumRuntime
"\"START_RUNTIME\" INTEGER," + // 3: startRuntime
"\"IS_UPLOAD\" INTEGER);"); // 4: isUpload
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"RUN_TIME_DATA\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, RunTimeData entity) {
stmt.clearBindings();
Long autoId = entity.getAutoId();
if (autoId != null) {
stmt.bindLong(1, autoId);
}
String cardId = entity.getCardId();
if (cardId != null) {
stmt.bindString(2, cardId);
}
Long sumRuntime = entity.getSumRuntime();
if (sumRuntime != null) {
stmt.bindLong(3, sumRuntime);
}
Long startRuntime = entity.getStartRuntime();
if (startRuntime != null) {
stmt.bindLong(4, startRuntime);
}
Integer isUpload = entity.getIsUpload();
if (isUpload != null) {
stmt.bindLong(5, isUpload);
}
}
@Override
protected final void bindValues(SQLiteStatement stmt, RunTimeData entity) {
stmt.clearBindings();
Long autoId = entity.getAutoId();
if (autoId != null) {
stmt.bindLong(1, autoId);
}
String cardId = entity.getCardId();
if (cardId != null) {
stmt.bindString(2, cardId);
}
Long sumRuntime = entity.getSumRuntime();
if (sumRuntime != null) {
stmt.bindLong(3, sumRuntime);
}
Long startRuntime = entity.getStartRuntime();
if (startRuntime != null) {
stmt.bindLong(4, startRuntime);
}
Integer isUpload = entity.getIsUpload();
if (isUpload != null) {
stmt.bindLong(5, isUpload);
}
}
@Override
public Long readKey(Cursor cursor, int offset) {
return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
}
@Override
public RunTimeData readEntity(Cursor cursor, int offset) {
RunTimeData entity = new RunTimeData( //
cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // autoId
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // cardId
cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2), // sumRuntime
cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3), // startRuntime
cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4) // isUpload
);
return entity;
}
@Override
public void readEntity(Cursor cursor, RunTimeData entity, int offset) {
entity.setAutoId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
entity.setCardId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
entity.setSumRuntime(cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2));
entity.setStartRuntime(cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3));
entity.setIsUpload(cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4));
}
@Override
protected final Long updateKeyAfterInsert(RunTimeData entity, long rowId) {
entity.setAutoId(rowId);
return rowId;
}
@Override
public Long getKey(RunTimeData entity) {
if(entity != null) {
return entity.getAutoId();
} else {
return null;
}
}
@Override
public boolean hasKey(RunTimeData entity) {
return entity.getAutoId() != null;
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}

View File

@ -0,0 +1,71 @@
package cn.trans88.taxiappkotlin.logic.model;
import com.google.gson.annotations.Expose;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import java.io.Serializable;
import org.greenrobot.greendao.annotation.Generated;
/**
* @Author LJH
* @Time 2024/2/29
* @description
*/
@Entity
public class RunTimeData implements Serializable {
private static final long serialVersionUID = 1L;
@Expose(serialize = false,deserialize = false)
@Id(autoincrement = true)
private Long autoId;
private String cardId; //设备id
private Long sumRuntime; //上一次开机的总运行时长
private Long startRuntime; //上一次开机的开始运行时间
private Integer isUpload; //是否上传 0 未上传; 1 已上传
@Generated(hash = 710149355)
public RunTimeData(Long autoId, String cardId, Long sumRuntime,
Long startRuntime, Integer isUpload) {
this.autoId = autoId;
this.cardId = cardId;
this.sumRuntime = sumRuntime;
this.startRuntime = startRuntime;
this.isUpload = isUpload;
}
@Generated(hash = 1108588427)
public RunTimeData() {
}
public Long getAutoId() {
return this.autoId;
}
public void setAutoId(Long autoId) {
this.autoId = autoId;
}
public String getCardId() {
return this.cardId;
}
public void setCardId(String cardId) {
this.cardId = cardId;
}
public Long getSumRuntime() {
return this.sumRuntime;
}
public void setSumRuntime(Long sumRuntime) {
this.sumRuntime = sumRuntime;
}
public Long getStartRuntime() {
return this.startRuntime;
}
public void setStartRuntime(Long startRuntime) {
this.startRuntime = startRuntime;
}
public Integer getIsUpload() {
return this.isUpload;
}
public void setIsUpload(Integer isUpload) {
this.isUpload = isUpload;
}
}

View File

@ -0,0 +1,37 @@
package cn.trans88.taxiappkotlin.logic.model;
/**
* @Author LJH
* @Time 2024/3/14
* @description
*/
public class SoftDecode {
private String id;
private String task_id;
private boolean isSoftDeCode;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTask_id() {
return task_id;
}
public void setTask_id(String task_id) {
this.task_id = task_id;
}
public boolean isSoftDeCode() {
return isSoftDeCode;
}
public void setSoftDeCode(boolean softDeCode) {
isSoftDeCode = softDeCode;
}
}

View File

@ -0,0 +1,18 @@
package cn.trans88.taxiappkotlin.logic.model;
/**
* @Author LJH
* @Time 2024/3/14
* @description
*/
public class SoftDecodeState extends SanleResponse{
private Boolean softDecode = false;
public Boolean getSoftDecode() {
return softDecode;
}
public void setSoftDecode(Boolean softDecode) {
this.softDecode = softDecode;
}
}

View File

@ -16,6 +16,7 @@ import cn.trans88.taxiappkotlin.logic.Repository
import cn.trans88.taxiappkotlin.logic.Repository.taxiApp
import cn.trans88.taxiappkotlin.logic.dao.DaoUtil
import cn.trans88.taxiappkotlin.logic.model.*
import cn.trans88.taxiappkotlin.net.EasyHttpTool
import cn.trans88.taxiappkotlin.play.RefreshPlayer
import cn.trans88.taxiappkotlin.ui.play.PlayActivity
import cn.trans88.taxiappkotlin.ui.play.isSendedLog
@ -33,6 +34,9 @@ import com.trs88.kurolibrary.execute.KuroExecutor
import com.trs88.kurolibrary.file.KuroFileUtil
import com.trs88.kurolibrary.file.PostFileCallBack
import com.xixun.xy.conn.aidl.ConnService
import com.zhouyou.http.EasyHttp
import com.zhouyou.http.callback.SimpleCallBack
import com.zhouyou.http.exception.ApiException
import net.sysolution.taxiapp.ITaxiListener
import okhttp3.*
import okhttp3.MediaType.Companion.toMediaTypeOrNull
@ -67,6 +71,11 @@ object ConnManger {
// val BaseUrl ="http://taxihub.cn:2346/"
private var connService: ConnService? = null
@Volatile
var sendPlayerLogSwitch: Boolean = false
@Volatile
var sendGPSLogSwitch: Boolean = false
/**
* 注册App
*/
@ -177,6 +186,9 @@ object ConnManger {
val registerToken = Configurations.config(TaxiApp.instance()).registerToken()
//不是默认账号则存入conn
if (!registerToken.equals(defaultToken)){
if (isBindOrTransfer){
isBindOrTransfer = false
}
"is not defaultToken,save message to conn.".loge()
initConnectMessage()
//测试平台要加
@ -194,7 +206,10 @@ object ConnManger {
}
// sendLogger()
sendLocation()
// sendLocation()
startPlayLogThread()
startLocationThread()
// debugLocation()
//edit by ljh @2023/9/1
WsManager.isRegister = false
WsManager.initWebSocket()
@ -207,9 +222,9 @@ object ConnManger {
isRegisterSuccess = false
// val timer = Timer()
//验证conn的信息
if (isBindOrTransfer){
isBindOrTransfer = false
}
// if (isBindOrTransfer){
// isBindOrTransfer = false
// }
DelayTimer.timer({ registerApp() }, 4000)
}
})
@ -447,7 +462,13 @@ object ConnManger {
val parse = ("application/json;charset=UTF-8").toMediaTypeOrNull()
val body = RequestBody.create(parse, requestJson)
val okHttpClient = OkHttpClient()
// val okHttpClient = OkHttpClient()
//edit by ljh @2024/2/26
val okHttpClient = OkHttpClient.Builder()
.connectTimeout(80, TimeUnit.SECONDS)
.readTimeout(80, TimeUnit.SECONDS)
.writeTimeout(80, TimeUnit.SECONDS)
.build()
//YoungUtil.YoungLog("准备上传坐标,上传地址:${SaveSimpleData.getLogServiceUrl()}")
YoungUtil.YoungLog("准备上传坐标")
YoungUtil.YoungLog("sendLocation:${requestJson}")
@ -461,8 +482,7 @@ object ConnManger {
call.enqueue(object : Callback {
override fun onFailure(call: Call, e: IOException) {
YoungUtil.YoungLog("上传坐标失败:${e.message}")
//日志存卡里
// taxiApp.saveLog("上传坐标失败,不删除失败的数据")
// DaoUtil.getLocationDao().deleteAll()
}
@ -498,7 +518,18 @@ object ConnManger {
taxiApp.gpsTimer = Timer()
taxiApp.gpsTimer?.schedule(object : TimerTask() {
override fun run() {
sendLocationToWeb()
//edit by ljh @2024/2/28
val locations = DaoUtil.getLocations()
if (locations.isNotEmpty()) {
val requestJson: String = ProcessingCommands.gson.toJson(locations)
//edit by ljh @2023/10/12
for (location in locations) {
DaoUtil.getLocationDao().delete(location)
}
EasyHttpTool.sendGPSToServer(requestJson)
}
// sendLocationToWeb()
// sendLocation()
}
}, 5000,10000)
@ -507,7 +538,18 @@ object ConnManger {
taxiApp.gpsTimer = Timer()
taxiApp.gpsTimer?.schedule(object : TimerTask() {
override fun run() {
sendLocationToWeb()
//edit by ljh @2024/2/28
val locations = DaoUtil.getLocations()
if (locations.isNotEmpty()) {
val requestJson: String = ProcessingCommands.gson.toJson(locations)
//edit by ljh @2023/10/12
for (location in locations) {
DaoUtil.getLocationDao().delete(location)
}
EasyHttpTool.sendGPSToServer(requestJson)
}
// sendLocationToWeb()
// sendLocation()
}
}, 5000,60 * 60 * 1000)
@ -515,6 +557,135 @@ object ConnManger {
}
}
/**
* 启动发送坐标线程
*/
fun startLocationThread(){
if (Configurations.config(TaxiApp.instance()).gpsSwitch()) {
if (!sendGPSLogSwitch){
thread {
"启动发送坐标线程".logd()
sendGPSLogSwitch = true
while (true) {
val locations = DaoUtil.getLocations()
"locations size:${locations.size}".logd()
if (locations.isNotEmpty()){
val upLocations = DaoUtil.getLocationDao().queryBuilder().limit(250).build().list()
val requestJson: String = ProcessingCommands.gson.toJson(upLocations)
"提交GPS数据 $requestJson".logd()
val parse = ("application/json;charset=UTF-8").toMediaTypeOrNull()
val body = RequestBody.create(parse, requestJson)
EasyHttp.post(Configurations.config(TaxiApp.instance()).logServiceUrl() + "postGpsLocationLog")
.readTimeOut(80*1000) //读超时80s,单位毫秒
.writeTimeOut(80*1000) //写超时80s,单位毫秒
.connectTimeout(80*1000) //连接超时80s,单位毫秒
.headers("Authorization", "Bearer ${Configurations.config(TaxiApp.instance()).appToken()}")
.requestBody(body)
.retryCount(5) //网络不好自动重试5次
.retryDelay(600) //本次请求重试延迟时间600ms
.syncRequest(true)//设置同步请求
.execute(object : SimpleCallBack<String>(){
override fun onError(e: ApiException?) {
"上传GPS数据失败${e?.message}".loge()
try {
Thread.sleep(3*60*1000L)
}catch (e: Exception) {
"${e?.message}".loge()
e.printStackTrace()
}
}
override fun onSuccess(t: String?) {
"上传GPS数据成功 $t".loge()
DaoUtil.getLocationDao().deleteInTx(upLocations)
"删除GPS数据成功".logd()
}
})
if(upLocations.size<250) {
try {
Thread.sleep(8*60*1000L)
} catch (e: Exception) {
"${e?.message}".loge()
e.printStackTrace()
}
}
} else {
"gps数据小于0条不上传3分钟后再次查询".logd()
try {
Thread.sleep(3*60*1000L)
}catch (e: Exception) {
"${e?.message}".loge()
e.printStackTrace()
}
}
}
}
} else {
"gps日志线程已经启动了无需再次启动".loge()
}
}
}
/**
* 提交GPS数据接口测试
*/
fun debugLocation(){
"开始提交GPS数据接口测试".logd()
thread {
while (true){
"提交GPS数据接口测试".logd()
val locations = mutableListOf<Location>()
for (i in 0 .. 1000){
for (j in 0 .. 1000){}
val location = Location().apply {
timestamp = System.currentTimeMillis()
longitude = 22.665534200203726
latitude = 113.91975187778473
bearing = 1F
speed = 1F
distance = 99F
elapse = 2
}
locations.add(location)
}
val jsonStr = ProcessingCommands.gson.toJson(locations)
"提交测试的GPS数据 $jsonStr".logd()
val parse = ("application/json;charset=UTF-8").toMediaTypeOrNull()
val body = RequestBody.create(parse, jsonStr)
EasyHttp.post(Configurations.config(TaxiApp.instance()).logServiceUrl() + "postGpsLocationLog")
.readTimeOut(80*1000) //读超时80s,单位毫秒
.writeTimeOut(80*1000) //写超时80s,单位毫秒
.connectTimeout(80*1000) //连接超时80s,单位毫秒
.headers("Authorization", "Bearer ${Configurations.config(TaxiApp.instance()).appToken()}")
.requestBody(body)
.retryCount(5) //网络不好自动重试5次
.retryDelay(600) //本次请求重试延迟时间600ms
.syncRequest(true)//设置同步请求
.execute(object : SimpleCallBack<String>(){
override fun onError(e: ApiException?) {
"上传测试的GPS数据失败${e?.message}".loge()
}
override fun onSuccess(t: String?) {
"上传测试的GPS数据成功 $t".loge()
locations.clear()
}
})
try {
Thread.sleep(3*60*1000L)
}catch (e: Exception) {
"${e?.message}".loge()
e.printStackTrace()
}
}
}
}
/**
* 播放次数到了发送终止广告指令
@ -693,7 +864,8 @@ object ConnManger {
"playLoggers size: ${playLoggers.size}".logd()
val requestJson = getLogSummaryJson(playLoggers)
if (requestJson.isNotEmpty()){
sendLogsSummaryToWeb(requestJson)
EasyHttpTool.sendPlayLogToServer(requestJson)
// sendLogsSummaryToWeb(requestJson)
}
}
}
@ -743,7 +915,6 @@ object ConnManger {
YoungUtil.YoungLog("上传日志成功:${response.message},response isSuccessful ${response.isSuccessful}${response.code}")
if (response.code == 200) {
Configurations.config(taxiApp).logSummaryJsonStringSave("")
isSendedLog = false
} else {
"服务器没回复200重新上传日志摘要".loge()
"3s后重新上传日志摘要".loge()
@ -767,11 +938,11 @@ object ConnManger {
* 获取昨天的日志概要Json数据
*/
private fun getLogSummaryJson(playLoggers:List<PlayLogger>):String{
val cacheJson = Configurations.config(taxiApp).logSummaryJsonString()
if (!cacheJson.isNullOrEmpty()){
"cacheJson:$cacheJson".logd()
return cacheJson
}
// val cacheJson = Configurations.config(taxiApp).logSummaryJsonString()
// if (!cacheJson.isNullOrEmpty()){
// "cacheJson:$cacheJson".logd()
// return cacheJson
// }
var jsonStr = ""
if (!playLoggers.isNullOrEmpty()){
val summaryList = ArrayList<LogSummary>()
@ -803,7 +974,7 @@ object ConnManger {
DaoUtil.getPlayLogger().delete(playLogger)
}
jsonStr = Gson().toJson(summaryList)
Configurations.config(taxiApp).logSummaryJsonStringSave(jsonStr)
// Configurations.config(taxiApp).logSummaryJsonStringSave(jsonStr)
}
"日志概要json:$jsonStr".loge()
return jsonStr
@ -892,6 +1063,41 @@ object ConnManger {
}
}
/**
* 提交播放日志
*/
fun startPlayLogThread(){
if (Configurations.config(TaxiApp.instance()).loggerSwitch()) {
if (!sendPlayerLogSwitch){
thread {
"提交播放日志线程启动".logd()
sendPlayerLogSwitch = true
while (true){
val playerLogs = DaoUtil.getPlayLoggers()
"播放日志数据数量:${playerLogs.size}".logd()
if (playerLogs.size>10){
EasyHttpTool.sendPlayLogToServer()
} else {
try {
Thread.sleep(60*1000L)
}catch (e: Exception){
"Exception:${e.message}".loge()
e.printStackTrace()
}
}
}
}
} else {
"播放日志线程已经启动了,无需再次启动!".loge()
}
}
}
/**
* 定时发送播放日志摘要
*/
@ -909,7 +1115,8 @@ object ConnManger {
"定时上传日志摘要playLoggers size: ${playLoggers.size}".logd()
val requestJson = getLogSummaryJson(playLoggers)
if (requestJson.isNotEmpty() && logsSummaryTimer == null){
sendLogsSummaryToWeb(requestJson)
EasyHttpTool.sendPlayLogToServer(requestJson)
// sendLogsSummaryToWeb(requestJson)
}
}
},interval*60*1000L,interval*60*1000L)

View File

@ -26,7 +26,6 @@ import com.trs88.kurolibrary.execute.KuroExecutor
import com.trs88.kurolibrary.file.KuroFileUtil
import java.io.*
import java.util.*
import kotlin.collections.ArrayList
object ProcessingCommands {
@ -82,8 +81,10 @@ object ProcessingCommands {
"get_advertise_order" -> sendOrderInfo(task,baseTask.type)
"update_player_log_switch" -> playLoggerSwitch(task,baseTask.type)
"update_gps_log_switch" -> gpsSwitch(task,baseTask.type)
"soft_decode_switch" -> isSoftDecodeSwitch(task,baseTask.type)
//获取播放日志开关状态
"get_player_log_state" -> getLoggerSwitch(task,baseTask.type)
"get_soft_decode" -> getSoftDecodeState(task,baseTask.type)
//设置日志上传间隔
"set_log_interval" -> setLogInterval(task,baseTask.type)
"get_log_interval" -> getLogInterval(task,baseTask.type)
@ -112,7 +113,9 @@ object ProcessingCommands {
//edit by yzd @20211201
//Settings.gpsSwitch =gpsSwitch.isTurn_on
Configurations.config(TaxiApp.instance()).gpsSwitchSave(gpsSwitch.isTurn_on)
ConnManger.sendLocation()
// ConnManger.sendLocation()
//edit by ljh @2024/2/29 定点数据上传优化
ConnManger.startLocationThread()
// if (gpsSwitch.isTurn_on){
// ConnManger.sendLocation()
// }
@ -216,7 +219,12 @@ object ProcessingCommands {
val response = gson.toJson(sanleResponse)
send(response)
//debug
//测试软解码开关
// taxiApp.isSoftDecode = !taxiApp.isSoftDecode
//测试gps
// val lat2 = 22.665534200203726
// val lon2 = 113.91975187778473
// val lat3 = 23.665534200203726
@ -238,21 +246,20 @@ object ProcessingCommands {
}
/**
* 实时获取当天taixApp运行时间
* 实时获取本次启动后的taixApp运行时间
*/
private fun getTodayRuntime(task: String, type: String) {
val baseResponse = gson.fromJson<BaseResponse>(task)
val sanleResponse = TodayRunTime()
val startRuntime = Configurations.config(TaxiApp.instance()).startRunTime()
val endRuntime = Configurations.config(TaxiApp.instance()).endRunTime()
val sumRuntime = Configurations.config(TaxiApp.instance()).sumRunTime()
val todayRuntime = endRuntime - startRuntime + sumRuntime
"getTodayRuntime-->当前taxiApp运行时间$todayRuntime".logd()
// val startRuntime = Configurations.config(TaxiApp.instance()).startRunTime()
// val endRuntime = Configurations.config(TaxiApp.instance()).endRunTime()
val todaySumRunTime = Configurations.config(TaxiApp.instance()).todaySumRunTime()
"getTodayRuntime-->当天taxiApp运行时间$todaySumRunTime".logd()
sanleResponse.type = type
sanleResponse.id = baseResponse.id
sanleResponse.task_id = baseResponse.task_id
sanleResponse.runtime = todayRuntime
sanleResponse.runtime = todaySumRunTime
val response = gson.toJson(sanleResponse)
send(response)
}
@ -272,6 +279,7 @@ object ProcessingCommands {
// ConnManger.loggerTimer?.purge()
// ConnManger.sendLogger()
ConnManger.startPlayLogThread()
}
baseResponse.type = type
@ -279,6 +287,41 @@ object ProcessingCommands {
send(response)
}
/**
* 是否设置软解码
* @param task String
* @param type String
*/
private fun isSoftDecodeSwitch(task: String, type: String) {
val baseResponse = gson.fromJson<BaseResponse>(task)
val loggerSwitch = gson.fromJson<SoftDecode>(task)
//edit by ljh @2024/3/14
Configurations.config(TaxiApp.instance()).isSoftDecodeSave(loggerSwitch.isSoftDeCode)
taxiApp.isSoftDecode = loggerSwitch.isSoftDeCode
baseResponse.type = type
val response = gson.toJson(baseResponse)
send(response)
}
/**
* 获取软解码开关状态
*/
private fun getSoftDecodeState(task: String, type: String) {
val baseResponse = gson.fromJson<BaseResponse>(task)
val sanleResponse = SoftDecodeState()
val turn_on = Configurations.config(TaxiApp.instance()).isSoftDecode()
"getSoftDecodeState --> 当前软解码开关状态开关状态:$turn_on".logd()
sanleResponse.type = type
sanleResponse.id = baseResponse.id
sanleResponse.task_id = baseResponse.task_id
sanleResponse.softDecode = turn_on
val response = gson.toJson(sanleResponse)
send(response)
}
/**
* 设置日志上传周期
*/

View File

@ -0,0 +1,15 @@
package cn.trans88.taxiappkotlin.net
import com.zhouyou.http.model.ApiResult
/**
*
* @Author LJH
* @Time 2024/2/28
* @description
*/
class EasyHttpResult<T> :ApiResult<T>(){
var message:String = ""
}

View File

@ -0,0 +1,204 @@
package cn.trans88.taxiappkotlin.net
import cn.trans88.taxiappkotlin.Configurations
import cn.trans88.taxiappkotlin.TaxiApp
import cn.trans88.taxiappkotlin.ext.logd
import cn.trans88.taxiappkotlin.ext.loge
import cn.trans88.taxiappkotlin.logic.dao.AdvertiseDao
import cn.trans88.taxiappkotlin.logic.dao.DaoUtil
import cn.trans88.taxiappkotlin.logic.dao.RunTimeDataDao
import cn.trans88.taxiappkotlin.logic.model.RunTimeData
import cn.trans88.taxiappkotlin.logic.model.RuntimeJson
import cn.trans88.taxiappkotlin.logic.network.ProcessingCommands
import cn.trans88.taxiappkotlin.ui.advertise.AdvertiseType
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.zhouyou.http.EasyHttp
import okhttp3.MediaType.Companion.toMediaTypeOrNull
import okhttp3.RequestBody
import com.zhouyou.http.callback.SimpleCallBack
import com.zhouyou.http.exception.ApiException
import java.util.stream.Collectors
/**
*
* @Author LJH
* @Time 2024/2/28
* @description
*/
object EasyHttpTool {
/**
* 提交运行时长
* @param runtimeJson String
*/
fun sendRunTimeToServer(runtimeJson: String){
"sendRunTimeToServer run".logd()
val parse = ("application/json;charset=UTF-8").toMediaTypeOrNull()
val body = RequestBody.create(parse, runtimeJson)
EasyHttp.post(Configurations.config(TaxiApp.instance()).logServiceUrl() + "postRunningTimeLog")
.readTimeOut(80*1000)
.writeTimeOut(80*1000)
.connectTimeout(80*1000)
.headers("Authorization", "Bearer ${Configurations.config(TaxiApp.instance()).appToken()}")
.headers("Accept-Encoding", "gzip")
.requestBody(body)
.retryCount(5)//本次请求重试次数
.retryDelay(600)//本次请求重试延迟时间600ms
.execute(object :SimpleCallBack<String>(){
override fun onError(e: ApiException?) {
"上传运行时长失败:${e?.message}".loge()
}
override fun onSuccess(t: String?) {
"上传运行时长成功:${t}".loge()
}
})
}
/**
* 提交运行时长
*/
fun sendRunTimeToServer(){
val sumTimeList = DaoUtil.getRunTimeDao().queryBuilder().where(
RunTimeDataDao.Properties.IsUpload.eq(0)).list()
"未提交的运行时长数量sumTimeList size: ${sumTimeList?.size}".logd()
if (!sumTimeList.isNullOrEmpty()){
for (runTimeData in sumTimeList) {
val runtimeJson = RuntimeJson(runTimeData.cardId,runTimeData.sumRuntime,runTimeData.startRuntime)
val runtimeJsonStr = Gson().toJson(runtimeJson)
"提交运行时长sendRunTimeToServer$runtimeJsonStr".logd()
val parse = ("application/json;charset=UTF-8").toMediaTypeOrNull()
val body = RequestBody.create(parse, runtimeJsonStr)
EasyHttp.post(Configurations.config(TaxiApp.instance()).logServiceUrl() + "postRunningTimeLog")
.readTimeOut(80*1000)
.writeTimeOut(80*1000)
.connectTimeout(80*1000)
.headers("Authorization", "Bearer ${Configurations.config(TaxiApp.instance()).appToken()}")
.headers("Accept-Encoding", "gzip")
.requestBody(body)
.retryCount(5)//本次请求重试次数
.retryDelay(600)//本次请求重试延迟时间600ms
.execute(object :SimpleCallBack<String>(){
override fun onError(e: ApiException?) {
"上传运行时长失败:${e?.message}".loge()
}
override fun onSuccess(t: String?) {
"上传运行时长成功:${t}".loge()
runTimeData.isUpload = 1
DaoUtil.getRunTimeDao().update(runTimeData)
"将提交的runTimeData标记成已上传".logd()
}
})
}
// val lists:List<RuntimeJson> = sumTimeList.map {
// RuntimeJson(it.cardId,it.sumRuntime,it.startRuntime)
// }
// val runtimeJson = Gson().toJson(lists)
}
}
/**
* 提交日志摘要
* @param gpsJson String
*/
fun sendPlayLogToServer(logJson: String){
"提交日志摘要 $logJson".logd()
val parse = ("application/json;charset=UTF-8").toMediaTypeOrNull()
val body = RequestBody.create(parse, logJson)
EasyHttp.post(Configurations.config(TaxiApp.instance()).logServiceUrl() + "postPlayerLogPlus")
.readTimeOut(80*1000)
.writeTimeOut(80*1000)
.connectTimeout(80*1000)
.headers("Authorization", "Bearer ${Configurations.config(TaxiApp.instance()).appToken()}")
.headers("Accept-Encoding", "gzip")
.requestBody(body)
.retryCount(5) //本次请求重试次数
.retryDelay(600) //本次请求重试延迟时间600ms
.execute(object :SimpleCallBack<String>(){
override fun onError(e: ApiException?) {
"上传日志摘要失败:${e?.message}".loge()
}
override fun onSuccess(t: String?) {
"上传日志摘要成功 $t".loge()
}
})
}
/**
* 提交GPS数据
* @param gpsJson String
*/
fun sendGPSToServer(gpsJson: String){
"提交GPS数据 $gpsJson".logd()
val parse = ("application/json;charset=UTF-8").toMediaTypeOrNull()
val body = RequestBody.create(parse, gpsJson)
EasyHttp.post(Configurations.config(TaxiApp.instance()).logServiceUrl() + "postGpsLocationLog")
.readTimeOut(80*1000)
.writeTimeOut(80*1000)
.connectTimeout(80*1000)
.headers("Authorization", "Bearer ${Configurations.config(TaxiApp.instance()).appToken()}")
.requestBody(body)
.retryCount(5) //本次请求重试次数
.retryDelay(600) //本次请求重试延迟时间600ms
.syncRequest(true)//设置同步请求
.execute(object :SimpleCallBack<String>(){
override fun onError(e: ApiException?) {
"上传GPS数据失败${e?.message}".loge()
}
override fun onSuccess(t: String?) {
"上传GPS数据成功 $t".loge()
}
})
}
/**
* 上传10条播放日志
*/
fun sendPlayLogToServer(){
val tenPlayLogs = DaoUtil.getPlayLogger().queryBuilder().limit(10).build().list()
val logJson = ProcessingCommands.gson.toJson(tenPlayLogs)
"提交日志Json $logJson".logd()
val parse = ("application/json;charset=UTF-8").toMediaTypeOrNull()
val body = RequestBody.create(parse, logJson)
EasyHttp.post(Configurations.config(TaxiApp.instance()).logServiceUrl() + "postPlayerLog")
.readTimeOut(80*1000)
.writeTimeOut(80*1000)
.connectTimeout(80*1000)
.headers("Authorization", "Bearer ${Configurations.config(TaxiApp.instance()).appToken()}")
.headers("Accept-Encoding", "gzip")
.requestBody(body)
.retryCount(5) //本次请求重试次数
.retryDelay(600) //本次请求重试延迟时间600ms
.syncRequest(true)//设置同步请求
.execute(object :SimpleCallBack<String>(){
override fun onError(e: ApiException?) {
"上传日志失败:${e?.message}".loge()
try {
Thread.sleep(60*1000L)
}catch (e: Exception){
"Exception:${e.message}".loge()
e.printStackTrace()
}
}
override fun onSuccess(t: String?) {
"上传日志成功 $t".loge()
DaoUtil.getPlayLogger().deleteInTx(tenPlayLogs)
"删除日志成功".loge()
}
})
}
}

View File

@ -0,0 +1,57 @@
package cn.trans88.taxiappkotlin.ui.play;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;
import cn.trans88.taxiappkotlin.R;
/**
* 无任何控制ui的播放
* Created by guoshuyu on 2017/8/6.
*/
public class EmptyControlVideo extends StandardGSYVideoPlayer {
public EmptyControlVideo(Context context, Boolean fullFlag) {
super(context, fullFlag);
}
public EmptyControlVideo(Context context) {
super(context);
}
public EmptyControlVideo(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public int getLayoutId() {
return R.layout.empty_control_video;
}
@Override
protected void touchSurfaceMoveFullLogic(float absDeltaX, float absDeltaY) {
super.touchSurfaceMoveFullLogic(absDeltaX, absDeltaY);
//不给触摸快进如果需要屏蔽下方代码即可
mChangePosition = false;
//不给触摸音量如果需要屏蔽下方代码即可
mChangeVolume = false;
//不给触摸亮度如果需要屏蔽下方代码即可
mBrightness = false;
}
// @Override
// protected void touchDoubleUp() {
// //super.touchDoubleUp();
// //不需要双击暂停
// }
@Override
protected void touchDoubleUp(MotionEvent e) {
//super.touchDoubleUp();
//不需要双击暂停
}
}

View File

@ -33,8 +33,10 @@ import cn.trans88.taxiappkotlin.logic.dao.PlayLoggerDao
import cn.trans88.taxiappkotlin.logic.gps.GpsReceiver
import cn.trans88.taxiappkotlin.logic.model.Advertise
import cn.trans88.taxiappkotlin.logic.model.Location
import cn.trans88.taxiappkotlin.logic.model.RunTimeData
import cn.trans88.taxiappkotlin.logic.model.RuntimeJson
import cn.trans88.taxiappkotlin.logic.network.*
import cn.trans88.taxiappkotlin.net.EasyHttpTool
import cn.trans88.taxiappkotlin.play.RefreshPlayer
import cn.trans88.taxiappkotlin.ui.advertise.AdvertiseType
import cn.trans88.taxiappkotlin.ui.broadcaskReceiver.BusCallback
@ -54,11 +56,16 @@ import com.permissionx.guolindev.PermissionX
import com.trs88.kurolibrary.execute.KuroExecutor
import com.trs88.kurolibrary.util.MainHandler
import com.xixun.xy.conn.aidl.ConnService
import com.zhouyou.http.EasyHttp
import kotlinx.android.synthetic.main.activity_main.*
import java.io.File
import java.lang.ref.WeakReference
import java.util.*
import kotlin.concurrent.thread
//未校时或没网时卡的初始时间存在为1970年的情况
// 时间至少大于1970-10-02 00:21:26才有可能已经校时完成
const val NOVALIDTIME = 23646086L
class PlayActivity : AppCompatActivity(), NetworkCallback, BusCallback, OnScreenSizeListener {
val CREATE_VIEW_MSG = 11111111
@ -77,6 +84,7 @@ class PlayActivity : AppCompatActivity(), NetworkCallback, BusCallback, OnScreen
private var saveRuntimeTimer:Timer? = null
private var startSaveRunTimer:Timer? = null
private var sumTimeTimer:Timer? = null
val handler = MyHandler(this)
@ -93,6 +101,8 @@ class PlayActivity : AppCompatActivity(), NetworkCallback, BusCallback, OnScreen
super.onCreate(savedInstanceState)
YoungUtil.YoungLog("playActivity onCreate")
TaxiApp.isActive = true
ConnManger.sendGPSLogSwitch = false
ConnManger.sendPlayerLogSwitch = false
//防止息屏
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
@ -128,7 +138,9 @@ class PlayActivity : AppCompatActivity(), NetworkCallback, BusCallback, OnScreen
val loggerSwitch = Configurations.config(this).loggerSwitch()
val gpsSwitch = Configurations.config(this).gpsSwitch()
"loggerSwitch ------> $loggerSwitch,gpsSwitch -----------> $gpsSwitch".logd()
val isSoftDecode = Configurations.config(this).isSoftDecode()
taxiApp.isSoftDecode = isSoftDecode
"loggerSwitch ------> $loggerSwitch,gpsSwitch -----------> $gpsSwitch,isSoftDecode----->$isSoftDecode".logd()
JoeyDownloadManager.getInstance().setCallBack(this)
@ -187,11 +199,66 @@ class PlayActivity : AppCompatActivity(), NetworkCallback, BusCallback, OnScreen
}
mLocationManager?.removeUpdates(getLocationListener())
}
saveStartTime()
},30 * 1000)
saveStartTimeThread()
// testLocation()
}
fun saveStartTimeThread(){
thread {
while (true) {
var cacheStartTime:Long = configurations.startRunTime()
var currentTime = System.currentTimeMillis()
"saveStartTimeThread ---> 当前系统时间currentTime:$currentTime".loge()
"saveStartTimeThread ---> 上一次的启动时间cacheStartTime:$cacheStartTime".loge()
if (currentTime > NOVALIDTIME && currentTime > cacheStartTime) {
//如果上一次启动时间和当前时间相比是第二天重置当天的总运行时长todaySunRuntime
var dayType = DateUtil.getDaysDiff(currentTime,cacheStartTime)
if (dayType != DayType.IS_SAME_DAY.ordinal){
"第二天了,重置当天的运行时长".logd()
configurations.todaySumRunTimeSave(0)
}
//删除已提交的运行时长数据
DaoUtil.deleteIsUpRunTimeData()
//如果上次缓存的总运行时长大于0,取出存到数据库中
val cacheSumTime = configurations.sumRunTime()
"cacheSumTime ---> 上一次的运行时长cacheSumTime:$cacheSumTime".loge()
if (cacheSumTime > 0 && cacheStartTime > NOVALIDTIME){
val cardId = configurations.cardId()
val runTimeData = RunTimeData()
runTimeData.cardId = cardId
runTimeData.sumRuntime = cacheSumTime
runTimeData.isUpload = 0
runTimeData.startRuntime = cacheStartTime
DaoUtil.getRunTimeDao().insert(runTimeData)
}
//提交未上传的运行时长数据
EasyHttpTool.sendRunTimeToServer()
//重新初始化startRunTime为当前启动时间,sumRuntime为0
configurations.startRunTimeSave(currentTime)
configurations.sumRunTimeSave(0)
//开启定时器让sumRunTime累加
startSaveSumTimer()
//跳出循环
break
} else {
"系统时间尚未校时80s后重新获取系统时间".loge()
try {
Thread.sleep(80*1000)
} catch (e:Exception) {
e.printStackTrace()
}
}
}
}
}
/**
* 保存开始运行时间
*/
@ -200,7 +267,7 @@ class PlayActivity : AppCompatActivity(), NetworkCallback, BusCallback, OnScreen
var currentTime = System.currentTimeMillis()
"saveStartTime ---> currentTime:$currentTime".loge()
if (currentTime > 23646086L && currentTime > cacheStartTime){
if (currentTime > NOVALIDTIME && currentTime > cacheStartTime){
startSaveRunTimer?.let {
it.purge()
@ -219,20 +286,20 @@ class PlayActivity : AppCompatActivity(), NetworkCallback, BusCallback, OnScreen
configurations.startRunTimeSave(currentTime)
configurations.endRunTimeSave(currentTime)
configurations.firstRunTimeSave(currentTime)
configurations.sumRunTimeSave(0L)
configurations.sumRunTimeSave(0)
configurations.runtimeJsonStringSave("")
startRuntimeTimer()
}
DayType.IS_SAME_DAY.ordinal -> {//同一天重启
isSendedLog = false
val logSummaryJson = configurations.logSummaryJsonString()
if (!logSummaryJson.isNullOrEmpty()){
"同一天重启,之前的日志数据没传,重新上传".loge()
ConnManger.sendLogsSummary()
} else {
isSendedLog = false
}
// val logSummaryJson = configurations.logSummaryJsonString()
// if (!logSummaryJson.isNullOrEmpty()){
// "同一天重启,之前的日志数据没传,重新上传".loge()
// ConnManger.sendLogsSummary()
// } else {
// isSendedLog = false
// }
sendLogInterval()
@ -249,10 +316,14 @@ class PlayActivity : AppCompatActivity(), NetworkCallback, BusCallback, OnScreen
//测试上报接口
// val runtimeJson = RuntimeJson(configurations.cardId(),todaySumRuntime,lastStartRuntime)
// val jsonStr = Gson().toJson(runtimeJson)
// "测试数据:$jsonStr".loge()
// configurations.runtimeJsonStringSave(Gson().toJson(runtimeJson))
if (!configurations.runtimeJsonString().isNullOrEmpty()){
ConnManger.sendRuntimeToWeb()
}
// if (!configurations.runtimeJsonString().isNullOrEmpty()){
// ConnManger.sendRuntimeToWeb()
// }
//保存新的开始运行时间,和结束时间
configurations.startRunTimeSave(currentTime)
@ -274,20 +345,23 @@ class PlayActivity : AppCompatActivity(), NetworkCallback, BusCallback, OnScreen
//提交昨天一整天的运行时间
val firstRuntime = configurations.firstRunTime()
val runtimeJson = RuntimeJson(configurations.cardId(),yesterdaySumTime,firstRuntime)
configurations.runtimeJsonStringSave(Gson().toJson(runtimeJson))
ConnManger.sendRuntimeToWeb()
// configurations.runtimeJsonStringSave(Gson().toJson(runtimeJson))
//edit by ljh on 2024/2/28
//优化上传运行时长方式
EasyHttpTool.sendRunTimeToServer(Gson().toJson(runtimeJson))
// ConnManger.sendRuntimeToWeb()
//保存新的开始运行时间,和结束时间
configurations.startRunTimeSave(currentTime)
configurations.endRunTimeSave(currentTime)
configurations.firstRunTimeSave(currentTime)
configurations.sumRunTimeSave(0L)
configurations.sumRunTimeSave(0)
startRuntimeTimer()
}
else -> {
configurations.startRunTimeSave(currentTime)
configurations.endRunTimeSave(currentTime)
configurations.firstRunTimeSave(currentTime)
configurations.sumRunTimeSave(0L)
configurations.sumRunTimeSave(0)
sendLogInterval()
}
}
@ -314,6 +388,49 @@ class PlayActivity : AppCompatActivity(), NetworkCallback, BusCallback, OnScreen
}
}
/**
* 启动计算运行时长的计时器
*/
private fun startSaveSumTimer(){
sumTimeTimer?.purge()
sumTimeTimer?.cancel()
sumTimeTimer = Timer()
"计算运行时长的计时器启动".logd()
sumTimeTimer?.schedule(object : TimerTask(){
override fun run() {
val startRuntime = configurations.startRunTime()
val currentTime = System.currentTimeMillis()
val currentType = DateUtil.getDaysDiff(currentTime,startRuntime)
var cacheSumRunTime = configurations.sumRunTime()
var cacheTodaySumRunTime = configurations.todaySumRunTime()
if (currentType == DayType.IS_SECOND_DAY.ordinal){
"当前时间已经是第二天了,记录一次".logd()
val cardId = configurations.cardId()
val rumTimeData = RunTimeData()
rumTimeData.isUpload = 0
rumTimeData.cardId = cardId
rumTimeData.sumRuntime = cacheSumRunTime
rumTimeData.startRuntime = startRuntime
DaoUtil.getRunTimeDao().insert(rumTimeData)
//重新初始化startRunTime为当前启动时间,sumRuntime为0
configurations.startRunTimeSave(currentTime)
configurations.sumRunTimeSave(0)
configurations.todaySumRunTimeSave(0)
cacheTodaySumRunTime = 0
cacheSumRunTime = 0
}
//每30s累加一次
"当前运行时长cacheSumRunTime${cacheSumRunTime},累加30s".logd()
configurations.sumRunTimeSave(cacheSumRunTime+30*1000L)
configurations.todaySumRunTimeSave(cacheTodaySumRunTime+30*1000L)
}
},30*1000L,30*1000L)
}
/**
* 启动计算运行时长的计时器
*/
@ -332,22 +449,22 @@ class PlayActivity : AppCompatActivity(), NetworkCallback, BusCallback, OnScreen
val type = DateUtil.getDaysDiff(endRuntime,startRuntime)
val currentType = DateUtil.getDaysDiff(currentTime,startRuntime)
val isSecond = DayType.IS_SECOND_DAY.ordinal == currentType
if (isSecond && Repository.taxiApp.sendLogTimes == 0) {
//当前时间被手动设置成第二天了,提交一次运行时长数据
isSendedLog = true
val lastRunTime = endRuntime - startRuntime
val yesterdayRuntime = configurations.sumRunTime() + lastRunTime
//提交昨天一整天的运行时间
val firstRuntime = configurations.firstRunTime()
val runtimeJson = RuntimeJson(configurations.cardId(),yesterdayRuntime,firstRuntime)
configurations.runtimeJsonStringSave(Gson().toJson(runtimeJson))
ConnManger.sendRuntimeToWeb()
//提交一次日志数据
ConnManger.sendLogsSummary()
Repository.taxiApp.sendLogTimes = 1
}
// if (isSecond && Repository.taxiApp.sendLogTimes == 0) {
// //当前时间被手动设置成第二天了,提交一次运行时长数据
// isSendedLog = true
// val lastRunTime = endRuntime - startRuntime
// val yesterdayRuntime = configurations.sumRunTime() + lastRunTime
// //提交昨天一整天的运行时间
// val firstRuntime = configurations.firstRunTime()
// val runtimeJson = RuntimeJson(configurations.cardId(),yesterdayRuntime,firstRuntime)
// configurations.runtimeJsonStringSave(Gson().toJson(runtimeJson))
// ConnManger.sendRuntimeToWeb()
//
// //提交一次日志数据
// ConnManger.sendLogsSummary()
//
// Repository.taxiApp.sendLogTimes = 1
// }
if (DayType.IS_SECOND_DAY.ordinal == type) {
ConnManger.sendLogsSummary()
@ -357,12 +474,14 @@ class PlayActivity : AppCompatActivity(), NetworkCallback, BusCallback, OnScreen
//提交昨天一整天的运行时间
val firstRuntime = configurations.firstRunTime()
val runtimeJson = RuntimeJson(configurations.cardId(),yesterdayRuntime,firstRuntime)
configurations.runtimeJsonStringSave(Gson().toJson(runtimeJson))
ConnManger.sendRuntimeToWeb()
// configurations.runtimeJsonStringSave(Gson().toJson(runtimeJson))
// ConnManger.sendRuntimeToWeb()
//edit by ljh on 2024/2/28
EasyHttpTool.sendRunTimeToServer(Gson().toJson(runtimeJson))
//保存新的开始运行时间,和结束时间
configurations.startRunTimeSave(endRuntime)
configurations.firstRunTimeSave(endRuntime)
configurations.sumRunTimeSave(0L)
configurations.sumRunTimeSave(0)
}
configurations.endRunTimeSave(endRuntime+30*1000L)

View File

@ -25,6 +25,7 @@ import cn.trans88.taxiappkotlin.TaxiApp
import cn.trans88.taxiappkotlin.TaxiApp.Companion.HAOSHENG
import cn.trans88.taxiappkotlin.ext.logd
import cn.trans88.taxiappkotlin.ext.loge
import cn.trans88.taxiappkotlin.logic.Repository
import cn.trans88.taxiappkotlin.logic.model.Advertise
import cn.trans88.taxiappkotlin.logic.model.BackgroundType
import cn.trans88.taxiappkotlin.logic.model.TextInfo
@ -37,6 +38,7 @@ import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.request.RequestOptions
import com.google.gson.Gson
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
import kotlinx.android.synthetic.main.activity_main.view.*
import java.io.File
@ -134,9 +136,23 @@ fun View.createView(context: Context, advertise: Advertise, seek: Int): View? {
// YoungUtil.YoungLog("初始化视频控件耗时:${currentTimeMillis - System.currentTimeMillis()}")
// video = jVideoView
// }
if (Repository.taxiApp.isSoftDecode){
"SoftDecode 使用的是软解码".logd()
//ijk GSYPlayer
val videoPlayer = EmptyControlVideo(context)
videoPlayer.setUp(advertise.pathName,true,"")
videoPlayer.startPlayLogic()
videoPlayer.setVideoAllCallBack(object : GSYSampleCallBack(){
override fun onPrepared(url: String?, vararg objects: Any?) {
super.onPrepared(url, *objects)
"视频准备完成".logd()
}
})
video = videoPlayer
} else {
"使用的是硬解码".logd()
//MediaPlayer
// YoungUtil.YoungLog("素材是视频:${Configurations.config(TaxiApp.instance()).downloadUrl()}${advertise.media_url}")
YoungUtil.YoungLog("素材是视频:${Configurations.config(TaxiApp.instance()).downloadUrl()}${advertise.media_url}")
val currentTimeMillis = System.currentTimeMillis()
val jVideoView = JVideoView(context)
@ -179,6 +195,10 @@ fun View.createView(context: Context, advertise: Advertise, seek: Int): View? {
}
YoungUtil.YoungLog("初始化视频控件耗时:${currentTimeMillis - System.currentTimeMillis()}")
video = jVideoView
}
//其他
// if (Build.VERSION.SDK_INT >= 26) {

View File

@ -83,6 +83,8 @@ import java.util.*
//todo 这里不应该持有ui应该要建立对应的livedata去回调给ui
//如果是第二天但是第一天日志没传完就设为true
var isSendedLog: Boolean = true
//从缓存获取次数达到8888次后从数据库获取一次数据并更新缓存
const val MAX_CACHE: Int = 8888
class PlayViewModel(val lifecycle: Lifecycle, private val fl_play: FrameLayout, private val imageView: ImageView) : ViewModel(), GpsInformationListener, IPlay, LifecycleObserver {
private val providerMap = HashMap<String,String>()
@ -803,26 +805,9 @@ class PlayViewModel(val lifecycle: Lifecycle, private val fl_play: FrameLayout,
// val roundingDuration = Math.ceil((curLogger!!.duration.toDouble() / 1000)) * 1000
// curLogger!!.duration = roundingDuration.toLong()
// DaoUtil.getPlayLoggerDao().insert(curLogger)
// "存储日志:${curLogger?.begin_play_ts}".loge()
"存储日志:${curLogger?.begin_play_ts}".loge()
// "当前日志数量:${DaoUtil.getPlayLoggers().size}".logd()
if (isSendedLog){
cachePlayLoggers.add(curLogger!!)
"缓存日志数据:${curLogger.toString()}".loge()
} else {
"存储日志数据:${curLogger.toString()}".loge()
val logs = DaoUtil.getPlayLoggers()
"当前日志数据size${logs.size}".logd()
for (log in logs) {
"日志数据:${log.toString()}"
}
DaoUtil.getPlayLoggerDao().insert(curLogger)
for (cachePlayLogger in cachePlayLoggers) {
"存储缓存的日志数据insert cachePlayLogger${cachePlayLogger.toString()}".logd()
DaoUtil.getPlayLoggerDao().insert(cachePlayLogger)
}
cachePlayLoggers.clear()
}
}
curLogger = null
}
@ -907,7 +892,7 @@ class PlayViewModel(val lifecycle: Lifecycle, private val fl_play: FrameLayout,
//edit by ljh @2023/8/28
regionCacheSwitch -= 1
if (regionCacheSwitch<=0){
regionCacheSwitch = 8888
regionCacheSwitch = MAX_CACHE
taxiApp.regionsList.clear()
}
// val regions = DaoUtil.getRegion().loadAll()
@ -1107,11 +1092,12 @@ class PlayViewModel(val lifecycle: Lifecycle, private val fl_play: FrameLayout,
}
//过滤掉距离过大的数据edit by ljh 2023/8/8
location.distance?.let {
if (it < 10000f){
// location.distance?.let {
// if (it < 10000f){
// DaoUtil.getLocationDao().insert(location)
// }
// }
DaoUtil.getLocationDao().insert(location)
}
}
curLocation = location
//debug 将日志存卡里看location信息对不对
// taxiApp.saveLog(location.toString())

View File

@ -22,6 +22,7 @@ public class DateUtil {
public static SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
/**
* 获取任务第一次执行的开始或者结束日期
* @param weekDay
@ -146,10 +147,10 @@ public class DateUtil {
Log.d("yzd_t", "daysDiff: " + daysDiff);
if (daysDiff == 1) {
Log.d("yzd_t","currentTimeStamp对应的时间是lastTimeStamp的后一天的时间。");
Log.d("yzd_t","对比当前时间是第二天");
dayType = DayType.IS_SECOND_DAY.ordinal();
} else if (daysDiff == 0) {
Log.d("yzd_t","currentTimeStamp对应的时间不是lastTimeStamp的后一天的时间。");
Log.d("yzd_t","对比当前时间是同一天");
dayType = DayType.IS_SAME_DAY.ordinal();
}

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black">
<FrameLayout
android:id="@+id/surface_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
</FrameLayout>
</RelativeLayout>

View File

@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":242,"versionName":"3.3.3-beta26.3.9.99-debug","enabled":true,"outputFile":"TaxiApp_v3.3.3-beta26.3.9.99-debug{242}.apk","fullName":"debug","baseName":"debug","dirName":""},"path":"TaxiApp_v3.3.3-beta26.3.9.99-debug{242}.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":245,"versionName":"3.3.3-beta26.4.0.5-debug","enabled":true,"outputFile":"TaxiApp_v3.3.3-beta26.4.0.5-debug{245}.apk","fullName":"debug","baseName":"debug","dirName":""},"path":"TaxiApp_v3.3.3-beta26.4.0.5-debug{245}.apk","properties":{}}]

View File

@ -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.
#Wed Dec 20 15:01:02 GMT+08:00 2023
#Mon Mar 18 15:40:17 GMT+08:00 2024
sdk.dir=D\:\\Android\\sdk

View File

@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":244,"versionName":"3.3.3-beta26.4.0.1-release","enabled":true,"outputFile":"TaxiApp_v3.3.3-beta26.4.0.1-release{244}.apk","fullName":"release","baseName":"release","dirName":""},"path":"TaxiApp_v3.3.3-beta26.4.0.1-release{244}.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":249,"versionName":"3.3.3-beta26.4.0.8-debug","enabled":true,"outputFile":"TaxiApp_v3.3.3-beta26.4.0.8-debug{249}.apk","fullName":"release","baseName":"release","dirName":""},"path":"TaxiApp_v3.3.3-beta26.4.0.8-debug{249}.apk","properties":{}}]