diff --git a/.idea/gradle.xml b/.idea/gradle.xml index ec699f0728..4ef835cd80 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -5,7 +5,6 @@ diff --git a/app/build.gradle b/app/build.gradle index 9d92439d0f..1c0e75aa78 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -100,19 +100,20 @@ dependencies { implementation rootProject.ext.dependencies.moduleonlinecar implementation rootProject.ext.dependencies.moduleV2x + implementation rootProject.ext.dependencies.moduletanlu,{ + exclude group:'com.mogo.module',module:'module-share' + } if (Boolean.valueOf(RELEASE)) { api rootProject.ext.dependencies.modulemain api rootProject.ext.dependencies.mogocommons implementation rootProject.ext.dependencies.modulecommon - implementation rootProject.ext.dependencies.moduletanlu implementation rootProject.ext.dependencies.modulesearch implementation rootProject.ext.dependencies.mogomoduleback } else { implementation project(':modules:mogo-module-main') implementation project(':foudations:mogo-commons') implementation project(':modules:mogo-module-common') - implementation project(':modules:mogo-module-tanlu') implementation project(':modules:mogo-module-search') implementation project(':modules:mogo-module-back') } diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java index 4a7536a491..fe4f56e171 100644 --- a/app/src/main/java/com/mogo/launcher/MogoApplication.java +++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java @@ -1,6 +1,7 @@ package com.mogo.launcher; import android.content.Context; +import android.util.Log; import androidx.multidex.MultiDex; @@ -36,6 +37,7 @@ public class MogoApplication extends AbsMogoApplication { public void onCreate() { super.onCreate(); // Crash 日志收集 + final long start = System.currentTimeMillis(); CrashSystem crashSystem = CrashSystem.getInstance(this); crashSystem.init(); //设置debug模式,日志不上传 @@ -43,8 +45,6 @@ public class MogoApplication extends AbsMogoApplication { Logger.init( BuildConfig.DEBUG ? LogLevel.DEBUG : LogLevel.OFF ); - DebugConfig.setNetMode(BuildConfig.NET_ENV); - DebugConfig.setDebug( BuildConfig.DEBUG ); //运营位卡片,需要默认显示,放在第一个加载 MogoModulePaths.addModule(new MogoModule(AdCardConstants.TAG, AdCardConstants.MODULE_NAME)); MogoModulePaths.addModule(new MogoModule(OnLineCarConstants.TAG, OnLineCarConstants.MODULE_NAME)); @@ -55,6 +55,7 @@ public class MogoApplication extends AbsMogoApplication { MogoModulePaths.addModule(new MogoModule( FreshNewsConstants.TAG, FreshNewsConstants.MODULE_NAME)); MogoModulePaths.addModule(new MogoModule(PushUIConstants.TAG, PushUIConstants.TAG)); MogoModulePaths.addModule(new MogoModule( BackToLauncherConst.MODULE_PATH, BackToLauncherConst.MODULE_NAME)); + Log.i("timer", "cost " + (System.currentTimeMillis() - start) + "ms"); } @Override @@ -68,5 +69,7 @@ public class MogoApplication extends AbsMogoApplication { protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(base); + DebugConfig.setNetMode(BuildConfig.NET_ENV); + DebugConfig.setDebug( BuildConfig.DEBUG ); } } diff --git a/config.gradle b/config.gradle index 3ae25352d4..5cdac9cd7e 100644 --- a/config.gradle +++ b/config.gradle @@ -79,8 +79,6 @@ ext { // modules - moduledemo : "com.mogo.module:module-demo:${DEMO_MODULE_MAP_VERSION}", - moduledemo2 : "com.mogo.module:module-demo2:${DEMO_MODULE_MAP2_VERSION}", moduletanlu : "com.mogo.module:module-tanlu:${MOGO_MODULE_TANLU_VERSION}", moduleshare : "com.mogo.module:module-share:${MOGO_MODULE_SHARE_VERSION}", mogocommons : "com.mogo.commons:mogo-commons:${MOGO_COMMONS_VERSION}", diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java index 1db758b56f..785c282c6c 100644 --- a/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java +++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java @@ -1,10 +1,8 @@ package com.mogo.commons; import android.app.Application; -import android.content.Context; import com.alibaba.android.arouter.launcher.ARouter; -import com.bumptech.glide.load.model.GlideUrl; import com.elegant.analytics.Analytics; import com.elegant.analytics.AnalyticsConfig; import com.mogo.commons.debug.DebugConfig; @@ -22,14 +20,12 @@ import com.zhidao.account.sdk.callback.TicketInfoCallback; import com.zhidao.account.sdk.network.NetEnvironManager; import java.io.IOException; -import java.io.InputStream; import java.security.SecureRandom; import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; import okhttp3.Interceptor; -import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; @@ -62,23 +58,57 @@ public class AbsMogoApplication extends Application { } private void syncInit(){ - // 初始化埋点 - Analytics.getInstance().start( sApp ); - Analytics.getInstance().setAppKey( "6bbe7e0e1ecd8e2f8dc336e1678a2791" ); - // 0 - debug 近实时上报,积累一条埋点上报,或者积累3秒上报一次。 - // 2 - 本地缓存,聚合上报,积累30条埋点上报,或者积累60秒上报一次。 - AnalyticsConfig.getInstance( sApp ).setMode( DebugConfig.isDebug() ? 2 : 2 ); - AnalyticsConfig.getInstance( sApp ).shouldLog( DebugConfig.isDebug() ); - // 初始化 arouter if ( DebugConfig.isDebug() ) { ARouter.openDebug(); ARouter.openLog(); } ARouter.init( sApp ); + } - initNetConfig(); - initAccountSdk(); + /** + * 忽略 https 验证 + * + * @return + * @throws Exception + */ + private static SSLContext getSslContext() throws Exception { + SSLContext sc = null; + sc = SSLContext.getInstance( "SSL" ); + sc.init( null, new TrustManager[]{new X509TrustManagerImpl()}, new SecureRandom() ); + return sc; + } + + private void asyncInit(){ + ThreadPoolService.execute( ()->{ + initNetConfig(); + initAccountSdk(); + // 初始化toast + TipToast.init( sApp, null ); + // 初始化埋点 + Analytics.getInstance().start( sApp ); + Analytics.getInstance().setAppKey( "6bbe7e0e1ecd8e2f8dc336e1678a2791" ); + // 0 - debug 近实时上报,积累一条埋点上报,或者积累3秒上报一次。 + // 2 - 本地缓存,聚合上报,积累30条埋点上报,或者积累60秒上报一次。 + AnalyticsConfig.getInstance( sApp ).setMode( DebugConfig.isDebug() ? 2 : 2 ); + AnalyticsConfig.getInstance( sApp ).shouldLog( DebugConfig.isDebug() ); + } ); + } + + private static void initAccountSdk() { + AccountClientManager.init( sApp, DebugConfig.getNetMode(), NetEnvironManager.OS_2C, "os2.0-launcher" ); + AccountClientManager.getTicket( new TicketInfoCallback() { + @Override + public void onSuccess( String ticket ) { + SpStorage.setTicket( ticket ); + Logger.w( TAG, "request ticket success" ); + } + + @Override + public void onFailure( int code, String msg ) { + Logger.w( TAG, "request ticket error code = %d, msg = %s", code, msg ); + } + } ); } private static void initNetConfig() { @@ -105,41 +135,4 @@ public class AbsMogoApplication extends Application { } ) .setLoggable( DebugConfig.isDebug() ); } - - /** - * 忽略 https 验证 - * - * @return - * @throws Exception - */ - private static SSLContext getSslContext() throws Exception { - SSLContext sc = null; - sc = SSLContext.getInstance( "SSL" ); - sc.init( null, new TrustManager[]{new X509TrustManagerImpl()}, new SecureRandom() ); - return sc; - } - - private void asyncInit(){ - ThreadPoolService.execute( ()->{ - initAccountSdk(); - // 初始化toast - TipToast.init( sApp, null ); - } ); - } - - private static void initAccountSdk() { - AccountClientManager.init( sApp, DebugConfig.getNetMode(), NetEnvironManager.OS_2C, "os2.0-launcher" ); - AccountClientManager.getTicket( new TicketInfoCallback() { - @Override - public void onSuccess( String ticket ) { - SpStorage.setTicket( ticket ); - Logger.w( TAG, "request ticket success" ); - } - - @Override - public void onFailure( int code, String msg ) { - Logger.w( TAG, "request ticket error code = %d, msg = %s", code, msg ); - } - } ); - } } diff --git a/gradle.properties b/gradle.properties index 0bc7e428f7..531f7096db 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,9 +26,7 @@ PASSWORD=xintai2018 # 编译模式: false - 依赖本地版本, true - 依赖 maven 版本 RELEASE=false # 模块版本 -DEMO_MODULE_MAP_VERSION=1.0.0-SNAPSHOT -DEMO_MODULE_MAP2_VERSION=1.0.0-SNAPSHOT -MOGO_MODULE_TANLU_VERSION=1.0.0-SNAPSHOT +## 工程内模块 MOGO_MODULE_SHARE_VERSION=1.0.0-SNAPSHOT MOGO_COMMONS_VERSION=1.0.0-SNAPSHOT MOGO_UTILS_VERSION=1.0.0-SNAPSHOT @@ -45,15 +43,26 @@ MOGO_CONNECTION_VERSION=1.0.0-SNAPSHOT MOGO_MODULE_NAVI_VERSION=1.0.0-SNAPSHOT MOGO_MODULE_SERVICE_VERSION=1.0.0-SNAPSHOT MOGO_MODULE_EXTENSIONS_VERSION=1.0.0-SNAPSHOT -CARCHATTING_VERSION=1.0.0-SNAPSHOT -CARCHATTINGPROVIDER_VERSION=1.0.0-SNAPSHOT -MOGO_MODULE_ONLINECAR_VERSION=1.0.0-SNAPSHOT -MOGO_MODULE_V2X_VERSION=1.0.0-SNAPSHOT -MOGO_MODULE_MEDIA_VERSION=1.0.0-SNAPSHOT -MOGO_MODULE_PUSH_VERSION=1.0.0-SNAPSHOT MOGO_MODULE_SEARCH_VERSION=1.0.0-SNAPSHOT -MOGO_MODULE_AD_CARD_VERSION=1.0.0-SNAPSHOT -MOGO_MODULE_FRESH_NEWS_VERSION=1.0.0-SNAPSHOT MOGO_MODULE_BACK_VERSION=1.0.0-SNAPSHOT +## 工程外部模块 +# 探路 +MOGO_MODULE_TANLU_VERSION=1.0.0-SNAPSHOT +# 车聊聊 +CARCHATTING_VERSION=1.0.0-SNAPSHOT +# 车聊聊接口 +CARCHATTINGPROVIDER_VERSION=1.0.0-SNAPSHOT +# 在线车辆 +MOGO_MODULE_ONLINECAR_VERSION=1.0.0-SNAPSHOT +# v2x +MOGO_MODULE_V2X_VERSION=1.0.0-SNAPSHOT +# 媒体卡片 +MOGO_MODULE_MEDIA_VERSION=1.0.0-SNAPSHOT +# 推送 +MOGO_MODULE_PUSH_VERSION=1.0.0-SNAPSHOT +# 广告资源位 +MOGO_MODULE_AD_CARD_VERSION=1.0.0-SNAPSHOT +# 新鲜水 +MOGO_MODULE_FRESH_NEWS_VERSION=1.0.0-SNAPSHOT diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/ExtensionsPresenter.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/ExtensionsPresenter.java index b24bcea2b1..e590c7e81f 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/ExtensionsPresenter.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/ExtensionsPresenter.java @@ -20,6 +20,9 @@ import com.mogo.module.extensions.weather.WeatherModel; import com.mogo.service.MogoServicePaths; import com.mogo.service.statusmanager.IMogoMsgCenter; import com.mogo.service.statusmanager.IMogoMsgCenterListener; +import com.mogo.service.statusmanager.IMogoStatusChangedListener; +import com.mogo.service.statusmanager.IMogoStatusManager; +import com.mogo.service.statusmanager.StatusDescriptor; import com.mogo.utils.logger.Logger; import java.util.ArrayDeque; @@ -40,7 +43,9 @@ import java.util.Set; *

* 描述 */ -public class ExtensionsPresenter extends Presenter< ExtensionsView > implements WeatherCallback, IMogoMsgCenterListener { +public class ExtensionsPresenter extends Presenter< ExtensionsView > implements WeatherCallback, + IMogoMsgCenterListener, + IMogoStatusChangedListener { private static final String TAG = "ExtensionsPresenter"; @@ -89,6 +94,8 @@ public class ExtensionsPresenter extends Presenter< ExtensionsView > implements private IMogoMsgCenter mMsgCenter; + private IMogoStatusManager mStatusManager; + private boolean generateTipWordsSequence() { if ( mAITipWords != null && mAITipWords.length > 0 ) { Random random = new Random( System.currentTimeMillis() ); @@ -126,6 +133,10 @@ public class ExtensionsPresenter extends Presenter< ExtensionsView > implements mMsgCenter = ( IMogoMsgCenter ) ARouter.getInstance().build( MogoServicePaths.PATH_MSG_CENTER ).navigation(); mMsgCenter.registerMsgCenterListener( this ); mHasTipWords = generateTipWordsSequence(); + + mStatusManager = ( IMogoStatusManager ) ARouter.getInstance().build( MogoServicePaths.PATH_STATUS_MANAGER ).navigation(); + mStatusManager.registerStatusChangedListener( TAG, StatusDescriptor.APP_LIST_UI, this ); + mStatusManager.registerStatusChangedListener( TAG, StatusDescriptor.SEARCH_UI, this ); } /** @@ -173,19 +184,38 @@ public class ExtensionsPresenter extends Presenter< ExtensionsView > implements } } + @Override + public void onStatusChanged( StatusDescriptor descriptor, boolean isTrue ) { + switch ( descriptor ) { + case APP_LIST_UI: + case SEARCH_UI: + changeAutoSwitchVoiceTipsWordsStatus( !isTrue ); + break; + } + } + @Override public void onResume( @NonNull LifecycleOwner owner ) { super.onResume( owner ); - if ( mHasTipWords ) { - mHandler.sendEmptyMessageDelayed( MSG_SWITCH_AI_TIP_WORDS, INTERVAL_TIME ); - } + changeAutoSwitchVoiceTipsWordsStatus( true ); } @Override public void onPause( @NonNull LifecycleOwner owner ) { super.onPause( owner ); - if ( mHasTipWords ) { + changeAutoSwitchVoiceTipsWordsStatus( true ); + } + + private void changeAutoSwitchVoiceTipsWordsStatus(boolean autoChange){ + if ( !mHasTipWords ) { + return; + } + if ( autoChange ) { + mHandler.sendEmptyMessageDelayed( MSG_SWITCH_AI_TIP_WORDS, INTERVAL_TIME ); + Logger.d( TAG, "auto switch" ); + } else { mHandler.removeMessages( MSG_SWITCH_AI_TIP_WORDS ); + Logger.d( TAG, "stop auto switch" ); } } diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java index 57a898b4aa..40fa8bfdae 100644 --- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java +++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java @@ -273,6 +273,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme @Override protected void onCreate( @Nullable Bundle savedInstanceState ) { + final long start = System.currentTimeMillis(); super.onCreate( savedInstanceState ); MogoModulePaths.addModule( new MogoModule( ServiceConst.PATH_REFRESH_STRATEGY, ServiceConst.PATH_REFRESH_STRATEGY ) ); @@ -308,12 +309,14 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme mMogoCardManager = ( IMogoCardManager ) ARouter.getInstance().build( MogoServicePaths.PATH_CARD_MANAGER ).navigation( this ); mAnalytics = ( IMogoAnalytics ) ARouter.getInstance().build( MogoServicePaths.PATH_UTILS_ANALYTICS ).navigation( this ); + + Log.i("timer", "cost " + (System.currentTimeMillis() - start) + "ms"); } private void startLocation() { mLocationClient = mMogoMapService.getSingletonLocationClient( getApplicationContext() ); mLocationClient.addLocationListener( this ); - mLocationClient.start(20_000L); + mLocationClient.start(2_000L); } private void loadContainerModules() { diff --git a/modules/mogo-module-tanlu/.gitignore b/modules/mogo-module-tanlu/.gitignore deleted file mode 100644 index 796b96d1c4..0000000000 --- a/modules/mogo-module-tanlu/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/modules/mogo-module-tanlu/build.gradle b/modules/mogo-module-tanlu/build.gradle deleted file mode 100644 index a1b62b8fdd..0000000000 --- a/modules/mogo-module-tanlu/build.gradle +++ /dev/null @@ -1,77 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' -apply plugin: 'com.alibaba.arouter' - -android { - compileSdkVersion rootProject.ext.android.compileSdkVersion - // buildToolsVersion rootProject.ext.android.buildToolsVersion - defaultConfig { - minSdkVersion rootProject.ext.android.minSdkVersion - targetSdkVersion rootProject.ext.android.targetSdkVersion - versionCode Integer.valueOf(VERSION_CODE) - versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION") - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles 'consumer-rules.pro' - - javaCompileOptions { - annotationProcessorOptions { - arguments = [AROUTER_MODULE_NAME: project.getName()] - } - } - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.0.2' - implementation 'androidx.core:core-ktx:1.0.2' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - implementation rootProject.ext.dependencies.androidxappcompat - implementation rootProject.ext.dependencies.androidxconstraintlayout - implementation rootProject.ext.dependencies.arouter - annotationProcessor rootProject.ext.dependencies.aroutercompiler - implementation rootProject.ext.dependencies.rxjava - implementation rootProject.ext.dependencies.rxandroid - - if (Boolean.valueOf(RELEASE)) { - implementation rootProject.ext.dependencies.mogomap - implementation rootProject.ext.dependencies.mogoutils - implementation rootProject.ext.dependencies.mogocommons - implementation rootProject.ext.dependencies.mogoserviceapi - compileOnly rootProject.ext.dependencies.modulecommon - compileOnly rootProject.ext.dependencies.moduleservice - implementation rootProject.ext.dependencies.moduleshare - } else { - implementation project(":libraries:mogo-map") - implementation project(":foudations:mogo-utils") - api project(":foudations:mogo-commons") - implementation project(':services:mogo-service-api') - compileOnly project(':modules:mogo-module-common') - compileOnly project(':modules:mogo-module-service') - implementation project(':modules:mogo-module-share') - } - - implementation rootProject.ext.dependencies.videoarmv7 - implementation rootProject.ext.dependencies.videoarm64 - implementation rootProject.ext.dependencies.videojava - implementation rootProject.ext.dependencies.eventbus - -} -apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString() -repositories { - mavenCentral() -} - diff --git a/modules/mogo-module-tanlu/consumer-rules.pro b/modules/mogo-module-tanlu/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/modules/mogo-module-tanlu/gradle.properties b/modules/mogo-module-tanlu/gradle.properties deleted file mode 100644 index 3b59b15369..0000000000 --- a/modules/mogo-module-tanlu/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -GROUP=com.mogo.module -POM_ARTIFACT_ID=module-tanlu -VERSION_CODE=1 diff --git a/modules/mogo-module-tanlu/proguard-rules.pro b/modules/mogo-module-tanlu/proguard-rules.pro deleted file mode 100644 index f1b424510d..0000000000 --- a/modules/mogo-module-tanlu/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/modules/mogo-module-tanlu/src/main/AndroidManifest.xml b/modules/mogo-module-tanlu/src/main/AndroidManifest.xml deleted file mode 100644 index 72fd803e28..0000000000 --- a/modules/mogo-module-tanlu/src/main/AndroidManifest.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/AlongTheWayCallback.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/AlongTheWayCallback.java deleted file mode 100644 index de8c420fc6..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/AlongTheWayCallback.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.mogo.module.tanlu.callback; - -import com.mogo.module.tanlu.model.InformationAndLiveCarResult; - -/** - * @author lixiaopeng - * @description 导航沿途搜索 - * @since 2020-01-09 - */ -public interface AlongTheWayCallback { - void onSuccess(InformationAndLiveCarResult data); - void onFail(String message, int code); -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/DataSetChangedAdapter.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/DataSetChangedAdapter.java deleted file mode 100644 index a13c7e2ff1..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/DataSetChangedAdapter.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.mogo.module.tanlu.callback; - -import com.mogo.service.datamanager.IMogoDataChangedListener; - -/** - * @author congtaowang - * @since 2020-02-12 - *

- * 描述 - */ -public class DataSetChangedAdapter implements IMogoDataChangedListener { - - private Object mData; - - private DataSetChangedAdapter(){ - // private constructor - } - - private static final class InstanceHolder{ - private static final DataSetChangedAdapter INSTANCE = new DataSetChangedAdapter(); - } - - private IMogoDataChangedListener mDelegate; - - public void setDelegate( IMogoDataChangedListener delegate ) { - this.mDelegate = delegate; - } - - public static DataSetChangedAdapter getInstance(){ - return InstanceHolder.INSTANCE; - } - - @Override - public void onDataSetChanged( Object data ) { - mData = data; - if ( mDelegate != null ) { - mDelegate.onDataSetChanged( data ); - } - } - - public Object getData() { - return mData; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/NaviCallback.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/NaviCallback.java deleted file mode 100644 index 3eb098bb58..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/NaviCallback.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.mogo.module.tanlu.callback; - -import com.mogo.module.tanlu.model.NaviResult; - -/** - * @author lixiaopeng - * @description 导航沿途数据 - * @since 2020-01-09 - */ -public interface NaviCallback { - void onSuccess(NaviResult data); - void onFail(String message, int code); -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/RoadLineCallback.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/RoadLineCallback.java deleted file mode 100644 index 53e81c13dc..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/RoadLineCallback.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.mogo.module.tanlu.callback; - -import com.mogo.module.tanlu.model.PathLineResult; - -/** - * @author lixiaopeng - * @description 通勤族回调 - * @since 2020-01-09 - */ -public interface RoadLineCallback { - void onSuccess(PathLineResult data); - void onFail(String message, int code); -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/UploadShareCallback.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/UploadShareCallback.java deleted file mode 100644 index c0ae07ea7a..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/UploadShareCallback.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.mogo.module.tanlu.callback; - -import com.mogo.commons.data.BaseData; - - -/** - * @author lixiaopeng - * @description 上报分享 - * @since 2020-01-09 - */ -public interface UploadShareCallback { - void onSuccess(BaseData data); - void onFail(String message, int code); -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/VoiceSearchCallback.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/VoiceSearchCallback.java deleted file mode 100644 index 6b0913e7fb..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/VoiceSearchCallback.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.mogo.module.tanlu.callback; - -import com.mogo.module.tanlu.model.VoiceSearchResult; - -/** - * @author lixiaopeng - * @description 声音控制搜索回调 - * @since 2020-01-09 - */ -public interface VoiceSearchCallback { - void onSuccess(VoiceSearchResult data); - void onFail(String message, int code); -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/Const.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/Const.kt deleted file mode 100644 index 9b99980698..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/Const.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.mogo.module.tanlu.constant - -const val REQUESTCODE_MAINACTIVITY = 0 -const val REQUESTCODE_MEDIAACTIVITY = 1 - -//EXTRA_STATE -const val AUTO_NAVI_START = 8 //开始导航 -const val AUTO_NAVI_END = 9 //结束导航 diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/HttpConst.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/HttpConst.java deleted file mode 100644 index 130956b35d..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/HttpConst.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.mogo.module.tanlu.constant; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-09 - */ -public class HttpConst { - public static final String HOST_DEV = "http://dzt-test.zhidaohulian.com"; - public static final String HOST_TEST = "http://dzt-test.zhidaohulian.com"; - public static final String HOST_PRODUCT = "https://dzt.zhidaohulian.com"; - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/TanluConstants.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/TanluConstants.java deleted file mode 100644 index 2506814f49..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/TanluConstants.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.mogo.module.tanlu.constant; - -/** - * @author congtaowang - * @since 2019-12-24 - *

- * 描述 - */ -public class TanluConstants { - - public static final String TAG = "/tanlu/ui"; - public static final String NAVI_INFO = "navi_info"; - public static final String MODEL_NAME = "CARD_TYPE_ROAD_CONDITION"; - - public static final String[] CMD_PLAY_ROAD_CONDITION = {"播放路况"}; - - //上报路况 - public static final String UPLOAD_ROAD_CONDITION = "command_upload_roadcondition"; - //xx堵不堵 - public static final String SPECIFIEDROAD_SEARCH = "com.zhidao.pathfinder.specifiedroad.search"; - //播放 - public static final String PLAY_VIDEO = "com.zhidao.tanlu.play"; - - //分享封路 - public static final String SHARE_ROAD_CLOSURE = "com.zhidao.share.road.closure"; - //分享交通检查 - public static final String SHARE_TRAFFIC_CHECK = "com.zhidao.share.traffic.check"; - //我要分享 - public static final String GO_TO_SHARE = "com.zhidao.share"; - - - - //埋点数据 - //marker点击 - public static final String LAUNCHER_ICON_CLICK = "Launcher_Icon_Click"; - //分享分类 1:路况,2:油价,3:交通检查,4:封路 - public static final String LAUNCHER_SHARE_TYPE = "Launcher_Share_type"; - //分享/上报按钮点击 from=1 手动点击 from=2 语音打开 - public static final String LAUNCHER_SHARE_CLICK = "Launcher_Share_Click"; - public static final String CARNET_USER_UPLOAD = "CarNet_user_upload"; - - //语音搜索 - public static final String CARNET_VOICE_SEARCH = "CarNet_Voice_Search"; - - //视频播放 - public static final String CARNET_USER_VIDEO_PLAY = "CarNet_user_video_play"; - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java deleted file mode 100644 index 32bb168011..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java +++ /dev/null @@ -1,1496 +0,0 @@ -package com.mogo.module.tanlu.fragment; - -import android.content.Intent; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.os.Bundle; -import android.os.Handler; -import android.os.Looper; -import android.os.Message; -import android.text.Html; -import android.text.TextUtils; -import android.util.Log; -import android.view.MotionEvent; -import android.view.View; -import android.widget.ImageView; -import android.widget.RelativeLayout; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - -import com.alibaba.android.arouter.launcher.ARouter; -import com.mogo.commons.data.BaseData; -import com.mogo.commons.mvp.IView; -import com.mogo.commons.mvp.MvpFragment; -import com.mogo.commons.mvp.Presenter; -import com.mogo.commons.voice.AIAssist; -import com.mogo.commons.voice.IMogoVoiceCmdCallBack; -import com.mogo.map.MogoLatLng; -import com.mogo.map.listener.IMogoMapListener; -import com.mogo.map.location.IMogoLocationListener; -import com.mogo.map.location.MogoLocation; -import com.mogo.map.marker.IMogoMarker; -import com.mogo.map.marker.IMogoMarkerClickListener; -import com.mogo.map.marker.IMogoMarkerManager; -import com.mogo.map.marker.MogoMarkerOptions; -import com.mogo.map.model.MogoPoi; -import com.mogo.map.navi.IMogoNaviListener; -import com.mogo.map.navi.MogoNaviInfo; -import com.mogo.map.navi.MogoTraffic; -import com.mogo.map.search.geo.IMogoGeoSearch; -import com.mogo.map.search.geo.IMogoGeoSearchListener; -import com.mogo.map.search.geo.MogoGeocodeAddress; -import com.mogo.map.search.geo.MogoGeocodeResult; -import com.mogo.map.search.geo.MogoPoiItem; -import com.mogo.map.search.geo.MogoRegeocodeResult; -import com.mogo.map.search.geo.query.MogoGeocodeQuery; -import com.mogo.map.search.poisearch.IMogoPoiSearch; -import com.mogo.map.search.poisearch.IMogoPoiSearchListener; -import com.mogo.map.search.poisearch.MogoPoiResult; -import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery; -import com.mogo.map.uicontroller.EnumMapUI; -import com.mogo.map.uicontroller.IMogoMapUIController; -import com.mogo.module.common.entity.MarkerExploreWay; -import com.mogo.module.common.entity.MarkerExploreWayItem; -import com.mogo.module.common.entity.MarkerLocation; -import com.mogo.module.common.entity.MarkerShowEntity; -import com.mogo.module.common.entity.MarkerUserInfo; -import com.mogo.module.service.receiver.MogoReceiver; -import com.mogo.module.share.ShareControl; -import com.mogo.module.tanlu.R; -import com.mogo.module.tanlu.callback.DataSetChangedAdapter; -import com.mogo.module.tanlu.callback.NaviCallback; -import com.mogo.module.tanlu.callback.RoadLineCallback; -import com.mogo.module.tanlu.callback.UploadShareCallback; -import com.mogo.module.tanlu.callback.VoiceSearchCallback; -import com.mogo.module.tanlu.constant.TanluConstants; -import com.mogo.module.tanlu.model.Center; -import com.mogo.module.tanlu.model.Information; -import com.mogo.module.tanlu.model.Items; -import com.mogo.module.tanlu.model.NaviResult; -import com.mogo.module.tanlu.model.PathLineResult; -import com.mogo.module.tanlu.model.TanluModelData; -import com.mogo.module.tanlu.model.VoiceSearchResult; -import com.mogo.module.tanlu.model.event.MarkerInfo; -import com.mogo.module.tanlu.model.event.PushTypeInfo; -import com.mogo.module.tanlu.model.event.SharedialogEvent; -import com.mogo.module.tanlu.util.Utils; -import com.mogo.module.tanlu.video.SimpleCoverVideoPlayer; -import com.mogo.module.tanlu.view.AutoZoomInImageView; -import com.mogo.service.MogoServicePaths; -import com.mogo.service.analytics.IMogoAnalytics; -import com.mogo.service.cardmanager.IMogoCardManager; -import com.mogo.service.datamanager.IMogoDataChangedListener; -import com.mogo.service.fragmentmanager.IMogoFragmentManager; -import com.mogo.service.imageloader.IMogoImageLoaderListener; -import com.mogo.service.imageloader.IMogoImageloader; -import com.mogo.service.imageloader.MogoImageView; -import com.mogo.service.intent.IMogoIntentListener; -import com.mogo.service.intent.IMogoIntentManager; -import com.mogo.service.map.IMogoMapService; -import com.mogo.service.module.IMogoModuleLifecycle; -import com.mogo.service.module.IMogoRegisterCenter; -import com.mogo.service.statusmanager.IMogoStatusManager; -import com.mogo.utils.TipToast; -import com.mogo.utils.logger.Logger; -import com.shuyu.gsyvideoplayer.GSYVideoManager; -import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder; - -import org.greenrobot.eventbus.EventBus; -import org.greenrobot.eventbus.Subscribe; -import org.greenrobot.eventbus.ThreadMode; -import org.json.JSONObject; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; - -import static com.mogo.module.tanlu.util.StringUitlKt.formatDate; -import static com.mogo.module.tanlu.util.Utils.handleDistance; -import static com.mogo.module.tanlu.video.VideoInitKt.initVideo; - -/** - * @author lixiaopeng - * @description 探路卡片 - * @since 2020-01-02 - */ - public class TanluCardViewFragment extends MvpFragment> - implements IView, - IMogoMarkerClickListener, - IMogoModuleLifecycle, - IMogoMapListener, - IMogoPoiSearchListener, - IMogoLocationListener, - View.OnClickListener, - IMogoDataChangedListener{ - - private static final String TAG = "TanluCardViewFragment"; - SimpleCoverVideoPlayer simpleCoverVideoPlayer; -// AutoZoomInImageView autoZoomInImageView; - ImageView autoZoomInImageView; - //map - private IMogoMarkerManager mMarkerManager; - private IMogoMapService mMogoMapService; - private IMogoCardManager iMogoCardManager; - private IMogoStatusManager mMogoStatusManager; - private IMogoIntentManager mogoIntentManager; //免唤醒 - private IMogoMapUIController mMApUIController; - private IMogoAnalytics mAnalytics; - private IMogoGeoSearch mIMogoGeoSearch; - private IMogoFragmentManager mIMogoFragmentManager; - - //声音控制文字 - private String voiceGetInfoMationTts; -// private String[] searchingVoiceStrings; - private String[] searchfaileVoiceStrings; - - //media - private GSYVideoOptionBuilder gsyVideoOptionBuilder = new GSYVideoOptionBuilder(); - private String mVideoUrl = ""; - private String mImageUrl = ""; - private String mTitle = ""; - private long mGenerateTime = 0; - private IMogoImageloader mogoImageloader; - private TextView mPreviousTv; - private TextView mNextTv; - private RelativeLayout mRootLayout; - private RelativeLayout mEmptyLayout; - private TextView mEmptyTv; - private TextView mAddressTv; - private TextView mDistanceTv; - private TextView mTimeTv; - - private List markerExploreWayList = new ArrayList<>(); - private int currentPosition = 0; //卡片媒体当前位置 - private Bitmap mMarkerIcon; - private Bitmap multiMarkerIcon; - private TanluModelData mTanluModelData; - private List passedByPoints; - private IMogoRegisterCenter mMogoRegisterCenter; - private String mKeywords; - private boolean isCurrentPage; - - private Handler mMsgHandler = new Handler( Looper.getMainLooper() ){ - @Override - public void handleMessage( Message msg ) { - super.handleMessage( msg ); - } - }; - @Override - protected int getLayoutId() { - return R.layout.tanlu_item_main_media_recycler; - } - - @Override - protected void initViews() { - initVideo(); - simpleCoverVideoPlayer = findViewById(R.id.video_player_main); - autoZoomInImageView = findViewById(R.id.tanlu_photo_imageView); - mPreviousTv = findViewById(R.id.tv_previous_res); - mNextTv = findViewById(R.id.tv_next_res); - mRootLayout = findViewById(R.id.layout_data_show); - mEmptyLayout = findViewById(R.id.layout_empty_data_show); - mEmptyTv = findViewById(R.id.tv_main_empty); - mAddressTv = findViewById(R.id.tv_information_media_content); - mDistanceTv = findViewById(R.id.tv_distance_video); - mTimeTv = findViewById(R.id.tv_information_media_time); - - mPreviousTv.setOnClickListener(this); - mNextTv.setOnClickListener(this); - mEmptyTv.setOnClickListener(this); - - simpleCoverVideoPlayer.setVisibility(View.VISIBLE); - autoZoomInImageView.setVisibility(View.GONE); - } - - - private void initInterface() { - //图片配置 - mogoImageloader = (IMogoImageloader) ARouter.getInstance().build(MogoServicePaths.PATH_UTILS_IMAGE_LOADER).navigation(); - //地图marker,地图操作 - mMogoMapService = (IMogoMapService) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICES_MAP).navigation(getActivity()); - mMarkerManager = mMogoMapService.getMarkerManager(getContext()); - mMApUIController = mMogoMapService.getMapUIController(); - //地图逆序 - mIMogoGeoSearch = mMogoMapService.getGeoSearch(getContext()); - - //切换卡片操作 - iMogoCardManager = (IMogoCardManager) ARouter.getInstance().build(MogoServicePaths.PATH_CARD_MANAGER).navigation(getActivity()); - mMogoRegisterCenter = (IMogoRegisterCenter) ARouter.getInstance().build(MogoServicePaths.PATH_REGISTER_CENTER).navigation(getContext()); - mMogoRegisterCenter.registerMogoModuleLifecycle(TanluConstants.MODEL_NAME, this); - //唤醒 - mogoIntentManager = (IMogoIntentManager) ARouter.getInstance().build(MogoServicePaths.PATH_INTENT_MANAGER).navigation(getContext()); - - mMogoStatusManager = (IMogoStatusManager) ARouter.getInstance().build(MogoServicePaths.PATH_STATUS_MANAGER).navigation(getContext()); - mAnalytics = (IMogoAnalytics) ARouter.getInstance().build(MogoServicePaths.PATH_UTILS_ANALYTICS).navigation(getContext()); - - mIMogoFragmentManager = (IMogoFragmentManager) ARouter.getInstance().build(MogoServicePaths.PATH_FRAGMENT_MANAGER).navigation(getContext()); - -// mIMogoGeoSearch.setGeoSearchListener(new IMogoGeoSearchListener() { -// @Override -// public void onRegeocodeSearched(MogoRegeocodeResult regeocodeResult) { -// Logger.d(TAG, "onRegeocodeSearched -----> "); -// } -// -// @Override -// public void onGeocodeSearched(MogoGeocodeResult geocodeResult) { -// Logger.d(TAG, "onGeocodeSearched ------mKeywords =" + mKeywords); -// if (geocodeResult != null) { -// if (geocodeResult.getAddresses() != null && geocodeResult.getAddresses().size() > 0) { -// Log.d(TAG, "geocodeResult.getAddresses().size() = " + geocodeResult.getAddresses().size()); -// MogoGeocodeAddress geocodeAddress = geocodeResult.getAddresses().get(0); -// MogoLatLng latLon = geocodeAddress.getLatlng(); -// Double longit; //经度 -// Double lat; //维度 -// if (mKeywords.equals("附近")) { -// Logger.d(TAG, "附近 ----1---"); -// longit = TanluServiceHandler.getLocationClient().getLastKnowLocation().getLongitude(); -// lat = TanluServiceHandler.getLocationClient().getLastKnowLocation().getLatitude(); -// } else { -// Logger.d(TAG, "其他 ---1----"); -// longit = latLon.lng; -// lat = latLon.lat; -// } -// Log.d(TAG, "geoSearch keywords =" + mKeywords + ">>longitude= " + longit + "--latitude= " + lat); -// getVoiceControlRoadData(mKeywords, lat, longit); -// } else { -// String cityCode = TanluServiceHandler.getLocationClient().getLastKnowLocation().getCityCode(); -// MogoPoiSearchQuery poiSearchQuery = new MogoPoiSearchQuery(mKeywords, "", cityCode); -// IMogoPoiSearch poiSearch = mMogoMapService.getPoiSearch(getContext(), poiSearchQuery); -// poiSearch.setPoiSearchListener(new IMogoPoiSearchListener() { -// @Override -// public void onPoiSearched(MogoPoiResult p0, int p1) { -// if (p1 == 1000) { -// if (p0.getPois() != null && p0.getPois().size() != 0) { -// MogoPoiItem poi = p0.getPois().get(0); -// MogoLatLng latLon = poi.getPoint(); -// Double longit; //经度 -// Double lat; //维度 -// if (mKeywords.equals("附近")) { -// Logger.d(TAG, "附近 ----2---"); -// longit = TanluServiceHandler.getLocationClient().getLastKnowLocation().getLongitude(); -// lat = TanluServiceHandler.getLocationClient().getLastKnowLocation().getLatitude(); -// } else { -// Logger.d(TAG, "其他 --2----"); -// longit = latLon.lng; -// lat = latLon.lat; -// } -// getVoiceControlRoadData(mKeywords, lat, longit); -// Log.d(TAG, "setOnPoiSearchListener keywords =" + mKeywords + ">>longitude= " + longit + "--latitude" + lat); -// } else { -// Logger.e(TAG, "poi == null"); -// } -// } else { -// Logger.e(TAG, "poi search result p1 = " + p1); -// } -// } -// -// @Override -// public void onPoiItemSearched(MogoPoiItem item, int errorCode) { -// -// } -// }); -// poiSearch.searchPOIAsyn(); -// } -// } else { -// Logger.e(TAG, "onGeocodeSearched -----geocodeResult == null"); -// speakFailVoice(searchfaileVoiceStrings[2]); -// } -// } -// }); - DataSetChangedAdapter.getInstance().setDelegate( this ); - } - - @Override - public void onActivityCreated(@Nullable Bundle savedInstanceState) { - super.onActivityCreated(savedInstanceState); - getViewLifecycleOwner().getLifecycle().addObserver(mPresenter); - EventBus.getDefault().register(this); - initInterface(); - initModelData(); - initMap(); - initStrings(); - initListener(); - Log.d(TAG, "onActivityCreated ------>"); - // 数据先到,卡片后创建 - initData( DataSetChangedAdapter.getInstance().getData() ); - sendShareReceiver("0"); - } - - private void initModelData() { - if (mTanluModelData == null) { - mTanluModelData = new TanluModelData(getContext()); - } - } - - /** - * 初始化导航 - */ - private void initMap() { - mMogoRegisterCenter.registerMogoNaviListener(TanluConstants.MODEL_NAME, new IMogoNaviListener() { - @Override - public void onInitNaviFailure() { - } - - @Override - public void onInitNaviSuccess() { - } - - @Override - public void onNaviInfoUpdate(MogoNaviInfo naviinfo) { - } - - @Override - public void onStartNavi() { //开始导航 - initModelData(); - getNavigationData(); - } - - @Override - public void onStopNavi() { - } - - @Override - public void onCalculateSuccess() { - } - - @Override - public void onoCalculateFailed() { - } - - @Override - public void onUpdateTraffic(MogoTraffic traffic) { - } - }); - - //监听marker点击 - mMogoRegisterCenter.registerMogoMarkerClickListener(TanluConstants.MODEL_NAME, new IMogoMarkerClickListener() { - @Override - public boolean onMarkerClicked(IMogoMarker marker) { - //marker 点击 - Map properties = new HashMap<>(); - properties.put("type", "2"); - mAnalytics.track(TanluConstants.LAUNCHER_ICON_CLICK, properties); - - mEmptyLayout.setVisibility(View.GONE); - mRootLayout.setVisibility(View.VISIBLE); - MarkerExploreWay exploreWay = extractFromMarker(marker); - if (exploreWay == null) { // 自己打点数据 - double lat = marker.getPosition().lat; - //更新当前位置 - for (int i = 0; i < markerExploreWayList.size(); i++) { - if (markerExploreWayList.get(i).getLocation().getLat() == lat) { - currentPosition = i; - break; - } - } - Log.d(TAG, "onMarkerClicked 自己打点数据 currentPosition = " + currentPosition); - handleMarkerExploreWay(markerExploreWayList.get(currentPosition)); - - } else { //大而全数据 - double lat = exploreWay.getLocation().getLat(); - for (int i = 0; i < markerExploreWayList.size(); i++) { - if (markerExploreWayList.get(i).getLocation().getLat() == lat) { - currentPosition = i; - break; - } - } - Log.d(TAG, "onMarkerClicked 大而全数据 currentPosition = " + currentPosition); - handleMarkerExploreWay(exploreWay); - } - return false; - } - }); - } - - - /** - * 处理关键词搜索 TODO - * - * @return - */ - private void handleActionFoo(String keywords) { -// speakSearchingVoice(); -// MogoGeocodeQuery geocodeQuery; -// String cityCode = TanluServiceHandler.getLocationClient().getLastKnowLocation().getCityCode(); -// -// geocodeQuery = new MogoGeocodeQuery(); -// geocodeQuery.setLocationName(keywords); -// geocodeQuery.setCity(cityCode); -// mIMogoGeoSearch.getFromLocationNameAsyn(geocodeQuery); - - - String cityCode = TanluServiceHandler.getLocationClient().getLastKnowLocation().getCityCode(); - MogoPoiSearchQuery poiSearchQuery = new MogoPoiSearchQuery(keywords, "", cityCode); - IMogoPoiSearch poiSearch = mMogoMapService.getPoiSearch(getContext(), poiSearchQuery); - poiSearch.setPoiSearchListener(this); - poiSearch.searchPOIAsyn(); - } - - /** - * 注册listener监听 - */ - private void initListener() { - mogoIntentManager.registerIntentListener(TanluConstants.UPLOAD_ROAD_CONDITION, mogoIntentListener); - mogoIntentManager.registerIntentListener(TanluConstants.SPECIFIEDROAD_SEARCH, mogoIntentListener); - mogoIntentManager.registerIntentListener(TanluConstants.SHARE_ROAD_CLOSURE, mogoIntentListener); - mogoIntentManager.registerIntentListener(TanluConstants.SHARE_TRAFFIC_CHECK, mogoIntentListener); - mogoIntentManager.registerIntentListener(TanluConstants.GO_TO_SHARE, mogoIntentListener); - } - - /** - * 唤醒语音 - */ - private IMogoIntentListener mogoIntentListener = new IMogoIntentListener() { - @Override - public void onIntentReceived(String intentStr, Intent intent) { - String data = intent.getStringExtra("data"); - Logger.d(TAG, "唤醒 mogoIntentListener intentStr =" + intentStr + ">>data =" + data); - if (intentStr.equals(TanluConstants.SPECIFIEDROAD_SEARCH)) { //地点堵不堵 --ok - try { - JSONObject jsonObject = new JSONObject(data); - mKeywords = jsonObject.get("location").toString(); - Logger.d(TAG, "mogoIntentListener specified mKeywords = " + mKeywords); - handleActionFoo(mKeywords); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (intentStr.equals(TanluConstants.UPLOAD_ROAD_CONDITION)) { //上报路况 免唤醒 --ok - traceTanluData("2"); - sendShareReceiver("1"); - Logger.d(TAG, "mogoIntentListener 上报路况 ----> "); - traceTypeData("1"); - ShareControl.getInstance(getActivity()).dismissDialog(); - } else if (intentStr.equals(TanluConstants.SHARE_ROAD_CLOSURE)) { //分享封路(封路了) --ok - sendShareReceiver("3"); - Logger.d(TAG, "mogoIntentListener 分享封路 ----> "); - traceTypeData("4"); - } else if (intentStr.equals(TanluConstants.SHARE_TRAFFIC_CHECK)) { //分享交通检查(交通检查) --ok - sendShareReceiver("2"); - Logger.d(TAG, "mogoIntentListener 分享交通检查 ----> "); - traceTypeData("3"); - } else if (intentStr.equals(TanluConstants.GO_TO_SHARE)) { //我要分享 --ok - ShareControl.getInstance(getActivity()).showDialog(); - Logger.d(TAG, "mogoIntentListener 我要分享 ----> "); - traceData("2"); - } - } - }; - - - /** - * 免唤醒语音监听 - */ - private IMogoVoiceCmdCallBack mogoVoiceListener = new IMogoVoiceCmdCallBack() { - @Override - public void onCmdSelected(String cmd) { - Log.d(TAG, "mogoVoiceListener cmd = " + cmd); - if (cmd.equals(TanluConstants.PLAY_VIDEO)) { //播放路况 --ok - //语音会中断播放 -// AIAssist.getInstance(getContext()).speakTTSVoice(getString(R.string.tanlu_prepare_play), null); - gsyVideoOptionBuilder.setUrl(mVideoUrl).setCacheWithPlay(false).setPlayTag(TAG) - .build(simpleCoverVideoPlayer); - simpleCoverVideoPlayer.getStartButton().performClick(); - traceVideoPlayStatusData(); - } - } - - @Override - public void onCmdAction(String speakText) { - } - - @Override - public void onCmdCancel(String speakText) { - } - - @Override - public void onSpeakEnd(String speakText) { - } - - @Override - public void onSpeakSelectTimeOut(String speakText) { - } - }; - - - /** - * type=1 路况 - *

- * type=2 油价 - *

- * type=3 交通检查 - *

- * type=4 封路 - * - * @param type - */ - private void traceTypeData(String type) { - Map properties = new HashMap<>(); - properties.put("type", type); - mAnalytics.track(TanluConstants.LAUNCHER_SHARE_TYPE, properties); - } - - /** - * 分享/上报按钮点击 from=1 手动点击 from=2 语音打开 - * @param from - */ - private void traceData(String from) { - Map properties = new HashMap<>(); - properties.put("from", from); - mAnalytics.track(TanluConstants.LAUNCHER_SHARE_CLICK, properties); - } - - private void traceTanluData(String type) { - Map properties = new HashMap<>(); - properties.put("type", type); - mAnalytics.track(TanluConstants.CARNET_USER_UPLOAD, properties); - } - - /** - * 发送广播 1拥堵,2交通检查,3封路 - */ - private void sendShareReceiver(String type) { - Logger.d(TAG, "TanluCardViewFragment sendShareReceiver ---->"); - Intent intent = new Intent(); - intent.setAction("com.zhidao.roadcondition.share"); - intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); - intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES); - intent.putExtra("type", type); - getContext().sendBroadcast(intent); - } - - - private MarkerExploreWay extractFromMarker(IMogoMarker marker) { - if (marker == null) { - return null; - } - if (marker.getObject() instanceof MarkerShowEntity) { - MarkerShowEntity showEntity = ((MarkerShowEntity) marker.getObject()); - if (showEntity.getBindObj() instanceof MarkerExploreWay) { - return ((MarkerExploreWay) showEntity.getBindObj()); - } - } - - return null; - } - - /** - * @param view - */ - @Override - public void onClick(View view) { - int id = view.getId(); - if (id == R.id.tv_previous_res) { //上一个 - //判断是图片还是视频,第一个时,上一个不可点击 - Log.e(TAG, " tv_previous_res --1-> currentPosition = " + currentPosition + " >> size= " + markerExploreWayList.size()); - if (currentPosition < 0) { - currentPosition = markerExploreWayList.size(); - } - currentPosition--; - Log.d(TAG, " tv_previous_res --2-> currentPosition = " + currentPosition + " >> size= " + markerExploreWayList.size()); - if (markerExploreWayList.size() > currentPosition && currentPosition >= 0) { - handleMarkerExploreWay(markerExploreWayList.get(currentPosition)); - moveToMarcker(markerExploreWayList.get(currentPosition).getLocation().getLat(), markerExploreWayList.get(currentPosition).getLocation().getLon()); - } - } else if (id == R.id.tv_next_res) { //下一个 - //判断是图片还是视频,最后一个时,下一个不可点击 - Log.e(TAG, " tv_next_res --1-> currentPosition = " + currentPosition + " >> size= " + markerExploreWayList.size()); - if (currentPosition >= markerExploreWayList.size()) { - currentPosition = 0; - } - currentPosition++; - Log.d(TAG, " tv_next_res --2-> currentPosition = " + currentPosition + " >> size= " + markerExploreWayList.size()); - if (markerExploreWayList.size() > currentPosition) { - handleMarkerExploreWay(markerExploreWayList.get(currentPosition)); - moveToMarcker(markerExploreWayList.get(currentPosition).getLocation().getLat(), markerExploreWayList.get(currentPosition).getLocation().getLon()); - } - - } else if (id == R.id.tv_main_empty) { //上报路况 - sendShareReceiver("1"); - } - } - - - private void moveToMarcker(double lat, double lon) { - MogoLatLng latLng = new MogoLatLng(lat, lon); - mMogoStatusManager.setUserInteractionStatus( TAG, true, false ); - mMApUIController.moveToCenter(latLng); - } - - /** - * 执行图片动画 - */ -// private void handleImageAnimation() { -// autoZoomInImageView.post(new Runnable() { -// @Override -// public void run() { -// //放大增量是0.3,放大时间是1000毫秒,放大开始时间是500毫秒以后 -// autoZoomInImageView.init() -// .startZoomInByScaleDeltaAndDuration(0.2f, 1000, 300); -// } -// }); -// } - - /** - * marker点击事件 - * - * @param marker - * @return - */ - @Override - public boolean onMarkerClicked(IMogoMarker marker) { - return true; - } - - /** - * 通用的处理数据逻辑 - * - * @param markerExploreWay - */ - private void handleMarkerExploreWay(MarkerExploreWay markerExploreWay) { - if (markerExploreWay != null) { - Log.d(TAG, "markerExploreWay.getFileType() =" + markerExploreWay.getFileType()); - if (markerExploreWay.getFileType() == 0) { //图片 - refreshPhotoData(markerExploreWay); - } else if (markerExploreWay.getFileType() == 1) { //视频 - refreshVideoData(markerExploreWay); - } - } else { - Log.e(TAG, "handleMarkerExploreWay == null"); - } - } - - /** - * 刷新单个视频数据,更新位置positon - */ - private void refreshVideoData(MarkerExploreWay markerExploreWay) { - if (markerExploreWay.getItems() == null) { - return; - } - - if (markerExploreWay.getItems().size() == 0) { - return; - } - - String videoUrl = markerExploreWay.getItems().get(0).getUrl(); - mImageUrl = markerExploreWay.getItems().get(0).getThumbnail(); - mGenerateTime = markerExploreWay.getGenerateTime(); - mTitle = markerExploreWay.getAddr(); - mAddressTv.setText(markerExploreWay.getAddr()); - mDistanceTv.setText(handleDistance(markerExploreWay.getDistance())); - mTimeTv.setText(formatDate(markerExploreWay.getGenerateTime())); - //判断是图片还是视频,第一个时,上一个不可点击 - autoZoomInImageView.setVisibility(View.GONE); - simpleCoverVideoPlayer.setVisibility(View.VISIBLE); - //视频配置 - mVideoUrl = videoUrl; - simpleCoverVideoPlayer.loadCoverImage(mImageUrl, getContext()); - gsyVideoOptionBuilder.setUrl(videoUrl).setCacheWithPlay(false).setPlayTag(TAG) - .build(simpleCoverVideoPlayer); - simpleCoverVideoPlayer.getStartButton().performClick(); - traceVideoPlayStatusData(); - Log.d(TAG, "videoUrl = " + videoUrl); - if (mImageUrl == null) { - return; - } - } - - /** - * 上传播放 - * - */ - private void traceVideoPlayStatusData() { - mAnalytics.track(TanluConstants.CARNET_USER_VIDEO_PLAY, null); - } - - - /** - * 刷新单个图片数据 - */ - private void refreshPhotoData(MarkerExploreWay markerExploreWay) { - if (markerExploreWay.getItems() == null) { - return; - } - - if (markerExploreWay.getItems().size() == 0) { - return; - } - - mAddressTv.setText(markerExploreWay.getAddr()); - mDistanceTv.setText(handleDistance(markerExploreWay.getDistance())); - mTimeTv.setText(formatDate(markerExploreWay.getGenerateTime())); - String thumbnailUrl = markerExploreWay.getItems().get(0).getUrl(); - Logger.d(TAG, "refreshPhoto thumbnailUrl ------>" + thumbnailUrl); - simpleCoverVideoPlayer.setVisibility(View.GONE); - autoZoomInImageView.setVisibility(View.VISIBLE); -// mogoImageloader.displayImage(thumbnailUrl, autoZoomInImageView); - - mogoImageloader.downloadImage(getActivity(), thumbnailUrl, new IMogoImageLoaderListener() { - @Override - public void onStart() { - } - - @Override - public void onCompleted(Bitmap bitmap) { - autoZoomInImageView.setImageBitmap(bitmap); - //动画 -// handleImageAnimation(); - } - - @Override - public void onFailure(Exception e) { - Log.e(TAG, "onFailure ------>" + e); - } - }); - } - - @NonNull - @Override - protected Presenter createPresenter() { - return new Presenter(this) { - }; - } - - /** - * C位事件,如何获取数据,需要有默认数据 TODO - * 如果只有一个数据,不显示上下切换按钮,没有数据显示空页面 - */ - @Override - public void onPerform() { - //免唤醒 - AIAssist.getInstance(getActivity()).registerUnWakeupCommand(TanluConstants.PLAY_VIDEO, - TanluConstants.CMD_PLAY_ROAD_CONDITION, mogoVoiceListener); - - isCurrentPage = true; - Logger.d(TAG, "tanlu卡片 onPerform 有效 ---->"); - renderCardViews(); - } - - /** - * 根究数据展示页面 - */ - private void renderCardViews(){ - if (markerExploreWayList != null && markerExploreWayList.size() > 0) { - mEmptyLayout.setVisibility(View.GONE); - mRootLayout.setVisibility(View.VISIBLE); - Logger.d(TAG, "onPerform markers.size() =" + markerExploreWayList.size()); - - Log.d("TAG", "tanlu卡片 onPerform 有效 markerExploreWayList.size() =" + markerExploreWayList.size()); - if (markerExploreWayList.size() == 1) { - mPreviousTv.setVisibility(View.GONE); - mNextTv.setVisibility(View.GONE); - } else { - mPreviousTv.setVisibility(View.VISIBLE); - mNextTv.setVisibility(View.VISIBLE); - } - - //延时展示第一个数据 - mMsgHandler.postDelayed( mDelayRunnable, 1_000L ); - } else { - mEmptyLayout.setVisibility(View.VISIBLE); - mRootLayout.setVisibility(View.GONE); - mEmptyTv.setText(Html.fromHtml(getContext().getString(R.string.main_empty_content))); - } - } - - private MarkerExploreWay mLastPlayEntity = null; - - // 播放第一个数据需要延时,避免滑动卡顿 - private Runnable mDelayRunnable = new Runnable() { - @Override - public void run() { - if ( isCurrentPage && !isRemoving() && !isDetached() ) { - try { - final MarkerExploreWay markerExploreWay = markerExploreWayList.get(0); - if ( mLastPlayEntity == markerExploreWay ) { - if ( markerExploreWay.getFileType() == 1 ) { - // 视频的话重新播放 - simpleCoverVideoPlayer.getGSYVideoManager().start(); - } - } else { - mLastPlayEntity = markerExploreWay; - handleMarkerExploreWay(markerExploreWay); - } - } catch( Exception e ){ - e.printStackTrace(); - } - } - } - }; - - @Override - public void onDataSetChanged( Object data ) { - Logger.d( TAG, "receive data changed." ); - initData( data ); - if ( isCurrentPage ) { - renderCardViews(); - } - } - - private void initData(Object data ){ - if ( markerExploreWayList != null ) { - markerExploreWayList.clear(); - } else { - markerExploreWayList = new ArrayList<>(); - } - try { - markerExploreWayList.addAll( (List)data ); - } catch ( Exception e ) { - Logger.e( TAG, e, "error." ); - } - } - - /** - * 离开C位事件 - */ - @Override - public void onDisable() { - Logger.d(TAG, "tanlu卡片 无效 ----->"); - isCurrentPage = false; - mMsgHandler.removeCallbacks( mDelayRunnable ); - if ( mLastPlayEntity != null ) { - if ( mLastPlayEntity.getFileType() == 1 ) { - try { - if ( simpleCoverVideoPlayer.getVisibility() == View.VISIBLE ) { - // 卡片滑动过去之后停止播放 - simpleCoverVideoPlayer.getGSYVideoManager().pause(); - } - } catch ( Exception e ) { - e.printStackTrace(); - } - } else { -// try { -// if ( autoZoomInImageView.getVisibility() == View.VISIBLE ) { -// autoZoomInImageView.stopCurrentAnimator(); -// } -// } catch ( Exception e ) { -// e.printStackTrace(); -// } - } - } - - AIAssist.getInstance(getActivity()).unregisterUnWakeupCommand(TanluConstants.PLAY_VIDEO); - } - - @Override - public void accOn() { - - } - - @Override - public void onMapLoaded() { -// Logger.d(TAG, "地图加载事件"); - } - - @Override - public void onTouch(MotionEvent motionEvent) { -// Logger.d( TAG, "地图触摸事件" ); - } - - @Override - public void onPOIClick(MogoPoi poi) { - if (poi != null) { - TipToast.shortTip(poi.getName()); - TanluServiceHandler.getPoiSearch().searchPOIIdAsyn(poi.getPoiId()); - } - } - - /** - * poi - * @param p0 - * @param p1 - */ - @Override - public void onPoiSearched(MogoPoiResult p0, int p1) { - if (p1 == 1000) { - if (p0.getPois() != null && p0.getPois().size() > 0) { - MogoPoiItem poi = p0.getPois().get(0); - MogoLatLng latLon = poi.getPoint(); - Double longit; //经度 - Double lat; //维度 - if (mKeywords.equals("附近")) { - Logger.d(TAG, "附近 ----1---"); - longit = TanluServiceHandler.getLocationClient().getLastKnowLocation().getLongitude(); - lat = TanluServiceHandler.getLocationClient().getLastKnowLocation().getLatitude(); - } else { - Logger.d(TAG, "其他 --1----"); - longit = latLon.lng; - lat = latLon.lat; - } - getVoiceControlRoadData(mKeywords, lat, longit); - Log.d(TAG, "setOnPoiSearchListener keywords =" + mKeywords + ">>longitude= " + longit + "--latitude" + lat); - } else { - Logger.e(TAG, "poi == null"); - Double longit; //经度 - Double lat; //维度 - if (mKeywords.equals("附近")) { - Logger.d(TAG, "附近 ----2---"); - longit = TanluServiceHandler.getLocationClient().getLastKnowLocation().getLongitude(); - lat = TanluServiceHandler.getLocationClient().getLastKnowLocation().getLatitude(); - getVoiceControlRoadData(mKeywords, lat, longit); - } else { - Logger.d(TAG, "其他 --2----"); - speakFailVoice(searchfaileVoiceStrings[2]); - } - } - } else { - Logger.e(TAG, "poi search result p1 = " + p1); - speakFailVoice(searchfaileVoiceStrings[2]); - } - } - - @Override - public void onPoiItemSearched(MogoPoiItem item, int errorCode) { - if (item == null) { - return; - } - } - - @Override - public void onLocationChanged(MogoLocation location) { - } - - @Override - public void onMapClick(MogoLatLng latLng) { - - } - - @Override - public void onLockMap(boolean isLock) { - - } - - @Override - public void onMapModeChanged(EnumMapUI ui) { - Logger.d(TAG, ui.name()); - } - - @Override - public void onMapChanged(MogoLatLng location, float zoom, float tilt, float bearing) { - - } - - @Override - public void onDestroyView() { - super.onDestroyView(); - EventBus.getDefault().unregister(this); - getViewLifecycleOwner().getLifecycle().removeObserver(mPresenter); - TanluServiceHandler.getLocationClient().removeLocationListener(this); - mMogoRegisterCenter.unregisterMogoNaviListener(TanluConstants.MODEL_NAME); - mogoIntentManager.unregisterIntentListener(MogoReceiver.ACTIION_ADAS); - Log.e(TAG, "onDestroyView --------> "); - GSYVideoManager.releaseAllVideos(); - } - - /** - * 分享弹框 - * @param event - */ - @Subscribe(threadMode = ThreadMode.MAIN) - public void onShareDialog(final SharedialogEvent event) { - if (event == null) { - return; - } - ShareControl.getInstance(getActivity()).showDialog(); - } - - /** - * 接收到分享对应数据打点 - * - * @param event - */ - @Subscribe(threadMode = ThreadMode.MAIN) - public void onMarkerInfo(final MarkerInfo event) { - if (event == null) { - return; - } - Log.d(TAG, "onMarkerInfo event.type =" + event.type + " >>event.lat = " + event.lat + " >>event.lon = " + event.lon + " >>event.imageUrl =" + event.imageUrl); - - String poiType = ""; - if (event.type.equals("1")) { //上报路况 - poiType = "10001"; - mMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_block_up); - } else if (event.type.equals("2")) { //交通检查 10002 - poiType = "10002"; - mMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_traffic_check); - } else if (event.type.equals("3")) { //封路 10003 - poiType = "10003"; - mMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_road_closure); - } - else { - poiType = "-1"; -// mMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_block_up); - } - - double lat = TanluServiceHandler.getLocationClient().getLastKnowLocation().getLatitude(); - double lon = TanluServiceHandler.getLocationClient().getLastKnowLocation().getLongitude(); - Log.d(TAG, "onMarkerInfo share onCompleted ---poiType =" + poiType); - if (!poiType.equals("-1")) { - Log.d(TAG, "onMarkerInfo share onCompleted ---!poiType------->"); - MogoMarkerOptions options = new MogoMarkerOptions() - .icon(mMarkerIcon) - .latitude(lat) //event.lat - .owner("share_tag") - .longitude(lon); //event.lon - mMarkerManager.addMarker("share_tag", options); //随便传tag,不可点击 share_tag TanluConstants.MODEL_NAME - AIAssist.getInstance(getContext()).speakTTSVoice(getString(R.string.tanlu_share_success), null); - } else { - Log.d(TAG, "onMarkerInfo share onCompleted ---!poiType--- else ---->"); - } - - //请求分享接口,只有封路和交通检查走新接口,老接口只有上报拥堵使用,并且定时任务都是拥堵的type - if (poiType.equals("10002") || poiType.equals("10003")) { - if (markerExploreWayList != null && markerExploreWayList.size() > 0) { - MarkerExploreWay markerExploreWay = markerExploreWayList.get(0); - if (markerExploreWay.getUserInfo() != null && !TextUtils.isEmpty(poiType)) { //上报路况不使用这个接口 - uploadShareInfo(poiType, event.imageUrl, markerExploreWay.getUserInfo().getUserName(), - markerExploreWay.getUserInfo().getUserHead()); - } else { - Log.e(TAG, "onMarkerInfo markerExploreWay.getUserInfo() == null"); - uploadShareInfo(poiType, event.imageUrl, "", ""); - } - } else { - Log.e(TAG, "onMarkerInfo share markerExploreWayList = null"); - uploadShareInfo(poiType, event.imageUrl, "", ""); - } - } - } - - - /** - * 上报分享信息 - */ - private void uploadShareInfo(final String poiType, String poiImgUrl, String nickname, String headImgUrl) { - double lat = TanluServiceHandler.getLocationClient().getLastKnowLocation().getLatitude(); - double lon = TanluServiceHandler.getLocationClient().getLastKnowLocation().getLongitude(); - String addressStr = TanluServiceHandler.getLocationClient().getLastKnowLocation().getAddress(); - Log.d(TAG, "uploadShareInfo lat =" + lat + ">>>lon =" + lon + ">>>addressStr =" + addressStr); - mTanluModelData.addTrafficCheckInfo(poiType, poiImgUrl, nickname, headImgUrl, lat, lon, addressStr, - new UploadShareCallback() { - @Override - public void onSuccess(BaseData data) { - Log.d(TAG, "uploadShareInfo onSuccess -----> poiType = " + poiType); - } - - @Override - public void onFail(String message, int code) { - Log.e(TAG, "uploadShareInfo onFail -----> poiType = " + poiType); - } - }); - } - - - /** - * push 类型,1为导航数据,2为通勤族 - * - * @param event - */ - @Subscribe(threadMode = ThreadMode.MAIN) - public void onPushInfo(final PushTypeInfo event) { - if (event != null && TextUtils.isEmpty(event.type)) { - Logger.d(TAG, " onPushInfo event.type =" + event.type); - if (event.type.equals("1")) { - getNaviRoadLineInfo(); - } else if (event.type.equals("2")) { - getRoadLineData(); - } - } else { - Log.e(TAG, "event == null "); - } - } - - - /** - * 导航路线数据事件 - */ - public void getNavigationData() { - mTanluModelData.getNaviInformation(mMogoMapService.getNavi(getContext()).getCalculatedPathPos(), - new NaviCallback() { - @Override - public void onSuccess(NaviResult data) { - List informationList = data.getResult().getInformations(); - Log.d(TAG, "getNavigationData onSuccess informationList =" + informationList); - if (informationList == null || (informationList != null && informationList.size() == 0)) { - return; - } - - if (markerExploreWayList != null && markerExploreWayList.size() > 0) { - markerExploreWayList.clear(); //刷新之前先删除之前的,然后再添加成请求的 - currentPosition = 0; - } - - //转换数据结构 - convertData(informationList); - //切换到探路卡片 - if (!isCurrentPage) { - iMogoCardManager.switch2(TanluConstants.MODEL_NAME); - } - - //清除探路之前的数据 - mMarkerManager.removeMarkers(TanluConstants.MODEL_NAME); - - //打点 - ArrayList optionList = new ArrayList<>(); - for (int i = 0; i < informationList.size(); i++) { - //根据type确定添加的图片 - String trafficType = informationList.get(i).trafficInfoType; - if (trafficType.equals("traffic_jam")) { //拥堵 - multiMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_block_up); - } else if (trafficType.equals("car_checking")) { //查车 - multiMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_traffic_check); - } else if (trafficType.equals("0")) { - multiMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_block_up); - } else if (trafficType.equals("traffic_control")) { - multiMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_road_closure); - } - - MogoMarkerOptions options = new MogoMarkerOptions() - .icon(multiMarkerIcon) - .latitude(informationList.get(i).lat) - .owner(TanluConstants.MODEL_NAME) - .longitude(informationList.get(i).lon); - - optionList.add(options); - } - Logger.d(TAG, "getNavigationData optionList.size() = " + optionList.size()); - mMarkerManager.addMarkers(TanluConstants.MODEL_NAME, optionList, true); - - //直接使用当前数据list,作为切换的数据源,切换左侧列表到最新的数据 - handleMarkerExploreWay(markerExploreWayList.get(0)); - } - - @Override - public void onFail(String message, int code) { - Log.d(TAG, "getNavigationData message = " + message + ">>>code =" + code); - } - }); - - } - - /** - * 通勤族 事件,监听消息自己请求路线数据 - */ - public void getRoadLineData() { - mTanluModelData.getRoadLineData(new RoadLineCallback() { - @Override - public void onSuccess(PathLineResult o) { - //绘制线路线 - if (o != null && o.getResult() != null && o.getResult().getPointList() != null - && o.getResult().getPointList().size() > 0) { - drawMapLine(o.getResult().getPointList()); - } else { - Log.e(TAG, "getRoadLineData onSuccess o.getPointList() == null"); - } - } - - @Override - public void onFail(String message, int code) { - Log.e(TAG, "getRoadLineData onFail message =" + message + ">>>code =" + code); - } - }); - } - - /** - * 导航路线,监听消息自己请求路线数据 - */ - public void getNaviRoadLineInfo() { - mTanluModelData.getNaviRoadLineInfo(new RoadLineCallback() { - @Override - public void onSuccess(PathLineResult o) { - //绘制线路线 - if (o != null && o.getResult() != null && o.getResult().getPointList() != null - && o.getResult().getPointList().size() > 0) { - drawMapLine(o.getResult().getPointList()); - } else { - Log.e(TAG, "getNaviRoadLineInfo onSuccess o.getPointList() == null"); - } - } - - @Override - public void onFail(String message, int code) { - Log.e(TAG, "getNaviRoadLineInfo onFail message =" + message + ">>>code =" + code); - } - }); - } - - /** - * 绘制线路 - */ - private void drawMapLine(List

pointList) { - //避免人为操作,刷新 - mMogoStatusManager.setUserInteractionStatus(TanluConstants.MODEL_NAME, true, true); - - int intervalNum = Utils.getIntervalValue(pointList.size()); - Logger.d(TAG, "drawMapLine intervalNum = " + intervalNum + ">>> pointList.size =" + pointList.size()); - int listSize = pointList.size(); - passedByPoints = new ArrayList<>(); - - //沿途最多15个点 - for (int i = 0; i < listSize; i += intervalNum) { - passedByPoints.add(new MogoLatLng(pointList.get(i).getLat(), (pointList.get(i).getLon()))); - } - - Logger.d(TAG, "drawMapLine passedByPoints.size() ----> " + passedByPoints.size()); - MogoLatLng startLatLng = new MogoLatLng(pointList.get(0).getLat(), pointList.get(0).getLon()); - MogoLatLng endLatLng = new MogoLatLng(pointList.get(listSize - 1).getLat(), pointList.get(listSize - 1).getLon()); - mMarkerManager.addRouteWay(getContext(), startLatLng, endLatLng, passedByPoints); - } - - - /** - * 声音控制道路数据 - */ - public void getVoiceControlRoadData(String keywords, final double lat, final double lon) { - String adCode = TanluServiceHandler.getLocationClient().getLastKnowLocation().getAdCode(); - String cityCode = TanluServiceHandler.getLocationClient().getLastKnowLocation().getCityCode(); - //移动到具体位置 - mMogoStatusManager.setUserInteractionStatus(TanluConstants.MODEL_NAME, true, true); - moveToMarcker(lat, lon); - - inputlon = lon; - inputlat = lat; - - Log.d(TAG, "StackSize() = " + mIMogoFragmentManager.getStackSize()); - if (mIMogoFragmentManager.getStackSize() > 0) { - mIMogoFragmentManager.clearAll(); - } - - Log.d(TAG, "getVoiceControlRoadData lat =" + lat + ">>>lon =" + lon + ">>>cityCode= " + cityCode + " >>>adCode = " + adCode); - mTanluModelData.getVoiceControlRoadData(keywords, cityCode, lon, lat, adCode, new VoiceSearchCallback() { - @Override - public void onSuccess(VoiceSearchResult o) { - String discription = o.getResult().getDescription(); - Log.d(TAG, "getVoiceControlRoadData onSuccess ----1--->"); - if (o.getResult().getInformations() != null && o.getResult().getInformations().size() > 0) { - Log.d(TAG, "getVoiceControlRoadData onSuccess ----2--->"); - if (markerExploreWayList != null && markerExploreWayList.size() > 0) { - markerExploreWayList.clear(); //刷新之前先删除之前的,然后再添加成请求的 - currentPosition = 0; - } - - //转换数据结构 - convertData(o.getResult().getInformations()); - //切换到探路卡片 - if (!isCurrentPage) { - iMogoCardManager.switch2(TanluConstants.MODEL_NAME); - } - - speakSuccessVoice(o.getResult().getInformations(), discription == null ? "" : discription); - - List informationList = o.getResult().getInformations(); - Log.d(TAG, "getVoiceControlRoadData onSuccess informationList =" + informationList); - if (informationList == null || (informationList != null && informationList.size() == 0)) { - return; - } - //清除探路之前的数据 - mMarkerManager.removeMarkers(TanluConstants.MODEL_NAME); - //添加埋点数据 - datalon = informationList.get(0).lon; - datalat = informationList.get(0).lat; - - //打点 - ArrayList optionList = new ArrayList<>(); - for (int i = 0; i < informationList.size(); i++) { - //根据type确定添加的图片 - String trafficType = informationList.get(i).trafficInfoType; - if (trafficType.equals("traffic_jam")) { //拥堵 - multiMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_block_up); - } else if (trafficType.equals("car_checking")) { //查车 - multiMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_traffic_check); - } else if (trafficType.equals("0")) { - multiMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_block_up); - } else if (trafficType.equals("traffic_control")) { - multiMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_road_closure); - } - - MogoMarkerOptions options = new MogoMarkerOptions() - .icon(multiMarkerIcon) - .latitude(informationList.get(i).lat) - .owner(TanluConstants.MODEL_NAME) - .longitude(informationList.get(i).lon); - - optionList.add(options); - } - Logger.d(TAG, "getVoiceControlRoadData optionList.size() = " + optionList.size()); - mMogoStatusManager.setUserInteractionStatus(TanluConstants.MODEL_NAME, true, false); - mMarkerManager.addMarkers(TanluConstants.MODEL_NAME, optionList, true); - - //直接使用当前数据list,作为切换的数据源,切换左侧列表到最新的数据 - handleMarkerExploreWay(markerExploreWayList.get(0)); - - } else { - if (!TextUtils.isEmpty(discription)) { - Log.d(TAG, "getVoiceControlRoadData discription != null else ----1--->"); - AIAssist.getInstance(getContext()).speakTTSVoice(discription, null); - } else { - Log.d(TAG, "getVoiceControlRoadData discription == null else ----2--->"); - AIAssist.getInstance(getContext()).speakTTSVoice("未找到其他车主分享的路况信息", null); - } - } - } - - @Override - public void onFail(String message, int code) { - Logger.e(TAG, "getVoiceControlRoadData onFail message = " + message + ">>>code= " + code); - speakFailVoice(searchfaileVoiceStrings[2]); - } - }); - } - - /** - * 将探路的数据结构转换成 MarkerExploreWay的列表 - */ - private void convertData(List informations) { - - if (informations.size() == 1) { - mPreviousTv.setVisibility(View.GONE); - mNextTv.setVisibility(View.GONE); - } else { - mPreviousTv.setVisibility(View.VISIBLE); - mNextTv.setVisibility(View.VISIBLE); - } - - for (int i = 0; i < informations.size(); i++) { - MarkerExploreWay markerExploreWay = new MarkerExploreWay(); - markerExploreWay.setAddr(informations.get(i).addr); - markerExploreWay.setCityName(informations.get(i).cityName); - markerExploreWay.setDistance(informations.get(i).distance); - markerExploreWay.setFileType(informations.get(i).type); - markerExploreWay.setItems(convertMediaData(informations.get(i).items)); - markerExploreWay.setLocation(convertLocation(informations.get(i))); - markerExploreWay.setUserInfo(convertUserInfo(informations.get(i))); - - markerExploreWayList.add(markerExploreWay); - } - Log.d(TAG, "convertData markerExploreWayList.size() =" + markerExploreWayList.size()); - } - - /** - * 转换媒体数据 - * - * @param items - * @return - */ - private List convertMediaData(ArrayList items) { - List exploreWayItems = new ArrayList<>(); - MarkerExploreWayItem item = new MarkerExploreWayItem(); - if (items != null && items.size() > 0) { - item.setThumbnail(items.get(0).getThumbnail()); - item.setUrl(items.get(0).getUrl()); - - exploreWayItems.add(item); - } - - return exploreWayItems; - } - - - private MarkerLocation convertLocation(Information information) { - MarkerLocation location = new MarkerLocation(); - location.setAddress(information.addr); - location.setAngle(0); - location.setLat(information.lat); - location.setLon(information.lon); - - return location; - } - - - private MarkerUserInfo convertUserInfo(Information information) { - MarkerUserInfo userInfo = new MarkerUserInfo(); - userInfo.setUserHead(information.headImgUrl); - userInfo.setUserName(information.nickName); - - return userInfo; - } - - - Random random = new Random(); - - private void speakSuccessVoice(List informations, String - trafficStatus) { - Log.d(TAG, "speakSuccessVoice informations.size() = " + informations.size()); - switch (informations.size()) { - case 0: - Logger.d(TAG, "speakSuccessVoice --0----> " + random.nextInt(3)); - speakFailVoice(searchfaileVoiceStrings[random.nextInt(3)]); - break; - - case 1: - Logger.d(TAG, "speakSuccessVoice ---1---> "); - trackVoiceSearch(1); - AIAssist.getInstance(getContext()).speakTTSVoice(( - String.format(voiceGetInfoMationTts, "1") + trafficStatus), null); - break; - - case 2: - trackVoiceSearch(1); - Logger.d(TAG, "speakSuccessVoice ---2---> "); - AIAssist.getInstance(getContext()).speakTTSVoice(( - String.format( - voiceGetInfoMationTts, - "2" - ) + trafficStatus), null); - break; - case 3: - Logger.d(TAG, "speakSuccessVoice ---3---> "); - trackVoiceSearch(1); - AIAssist.getInstance(getContext()).speakTTSVoice(( - String.format( - voiceGetInfoMationTts, - "3" - ) + trafficStatus), null); - break; - - default: - Logger.d(TAG, "speakSuccessVoice ---default-> "); - trackVoiceSearch(1); - AIAssist.getInstance(getContext()).speakTTSVoice(( - String.format( - voiceGetInfoMationTts, - "多" - ) + trafficStatus), null); - } - } - - private void initStrings() { - voiceGetInfoMationTts = - getContext().getResources().getString(R.string.voice_get_informations_tts); -// searchingVoiceStrings = -// getContext().getResources().getStringArray(R.array.searching_voice_string_array); - searchfaileVoiceStrings = - getContext().getResources().getStringArray(R.array.search_fail_voice_array); - } - - private void speakFailVoice(String string) { - AIAssist.getInstance(getContext()).speakTTSVoice(string, null); - } - - private void speakSearchingVoice() { -// AIAssist.getInstance(getContext()).speakTTSVoice(searchingVoiceStrings[random.nextInt(3)], null); - } - - - Double inputlon = 0.0;//经度 - Double inputlat = 0.0; //维度 - Double datalon = 0.0; //经度 - Double datalat = 0.0; //维度 - - //上报语音搜索 - private void trackVoiceSearch(int type) { - Map properties = new HashMap<>(); - properties.put("type", type); - properties.put("searchtext", mKeywords); - properties.put("inputlon", inputlon); - properties.put("inputlat", inputlat); - properties.put("datalon", datalon); - properties.put("datalat", datalat); - mAnalytics.track(TanluConstants.CARNET_VOICE_SEARCH, properties); - } - -} - - diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewProvider.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewProvider.java deleted file mode 100644 index 645707060f..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewProvider.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.mogo.module.tanlu.fragment; - -import android.content.Context; -import android.os.Bundle; -import android.view.View; - -import androidx.fragment.app.Fragment; - -import com.alibaba.android.arouter.facade.annotation.Route; -import com.mogo.map.listener.IMogoMapListener; -import com.mogo.map.location.IMogoLocationListener; -import com.mogo.map.marker.IMogoMarkerClickListener; -import com.mogo.map.navi.IMogoNaviListener; -import com.mogo.module.tanlu.callback.DataSetChangedAdapter; -import com.mogo.service.module.IMogoModuleLifecycle; -import com.mogo.service.module.IMogoModuleProvider; -import com.mogo.service.module.ModuleType; -import com.mogo.module.tanlu.constant.TanluConstants; -import com.mogo.utils.logger.Logger; - -/** - * @author congtaowang - * @since 2019-12-24 - *

- * 描述 - */ -@Route( path = TanluConstants.TAG ) -public class TanluCardViewProvider implements IMogoModuleProvider { - - private static final String TAG = "TanluCardViewProvider"; - private TanluCardViewFragment fragment; - - @Override - public Fragment createFragment( Context context, Bundle data ) { - fragment = new TanluCardViewFragment(); - fragment.setArguments( data ); - Logger.i( TAG, "createFragment" ); - return fragment; - } - - @Override - public void init( Context context ) { - TanluServiceHandler.init( context ); - TanluServiceHandler.getDataManager().registerDataListener( TanluConstants.MODEL_NAME, DataSetChangedAdapter.getInstance() ); - Logger.d(TAG, "init ----------> "); - } - - @Override - public String getModuleName() { - return "CARD_TYPE_ROAD_CONDITION"; - } - - @Override - public IMogoModuleLifecycle getCardLifecycle() { - return fragment; - } - - @Override - public View createView( Context context ) { - // don't - return null; - } - - @Override - public IMogoMapListener getMapListener() { - return fragment; - } - - @Override - public int getType() { - return ModuleType.TYPE_CARD_FRAGMENT; - } - - @Override - public IMogoNaviListener getNaviListener() { - return null; - } - - @Override - public IMogoLocationListener getLocationListener() { - return fragment; - } - - @Override - public IMogoMarkerClickListener getMarkerClickListener() { - return null; - } - - @Override - public String getAppPackage() { - return ""; - } - - @Override - public String getAppName() { - return "探路"; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluServiceHandler.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluServiceHandler.java deleted file mode 100644 index 116483aed8..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluServiceHandler.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.mogo.module.tanlu.fragment; - -import android.content.Context; - -import com.alibaba.android.arouter.launcher.ARouter; -import com.mogo.map.location.IMogoLocationClient; -import com.mogo.map.marker.IMogoMarkerManager; -import com.mogo.map.navi.IMogoNavi; -import com.mogo.map.search.poisearch.IMogoPoiSearch; -import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery; -import com.mogo.map.uicontroller.IMogoMapUIController; -import com.mogo.service.MogoServicePaths; -import com.mogo.service.datamanager.IMogoDataChangedListener; -import com.mogo.service.datamanager.IMogoDataManager; -import com.mogo.service.imageloader.IMogoImageloader; -import com.mogo.service.map.IMogoMapService; - -/** - * @author congtaowang - * @since 2019-12-30 - *

- * 持有服务接口实例 - */ -public class TanluServiceHandler { - - private static IMogoMapService mMapService; - private static IMogoPoiSearch mPoiSearch; - private static IMogoLocationClient mLocationClient; - private static IMogoMarkerManager mMarkerManager; - private static IMogoNavi mNavi; - private static IMogoMapUIController mMapUIController; - private static IMogoImageloader mImageloader; - private static IMogoDataManager mDataManager; - - public static void init( Context context ) { - mMapService = ( IMogoMapService ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICES_MAP ).navigation( context ); - mMapService = ( IMogoMapService ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICES_MAP ).navigation( context ); - mImageloader = ( IMogoImageloader ) ARouter.getInstance().build( MogoServicePaths.PATH_UTILS_IMAGE_LOADER ).navigation( context ); - mPoiSearch = mMapService.getPoiSearch( context, new MogoPoiSearchQuery() ); -// mLocationClient = mMapService.getLocationClient( context ); - mLocationClient = mMapService.getSingletonLocationClient(context); - mMarkerManager = mMapService.getMarkerManager( context ); - mNavi = mMapService.getNavi( context ); - mMapUIController = mMapService.getMapUIController(); - mDataManager = (IMogoDataManager)ARouter.getInstance().build( MogoServicePaths.PATH_DATA_MANAGER ).navigation(context); - } - - public static IMogoMapService getMapService() { - return mMapService; - } - - public static IMogoPoiSearch getPoiSearch() { - return mPoiSearch; - } - - public static IMogoLocationClient getLocationClient() { - return mLocationClient; - } - - public static IMogoMarkerManager getMarkerManager() { - return mMarkerManager; - } - - public static IMogoNavi getNavi() { - return mNavi; - } - - public static IMogoMapUIController getMapUIController() { - return mMapUIController; - } - - public static IMogoImageloader getImageloader() { - return mImageloader; - } - - public static IMogoDataManager getDataManager() { - return mDataManager; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/CarsLive.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/CarsLive.kt deleted file mode 100644 index aeacd5025c..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/CarsLive.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.mogo.module.tanlu.model - -class CarsLive { - var sn: String - var lat: Double - var lon: Double - var direction: Int - var canLive: Int - - constructor(sn: String, lat: Double, lon: Double, direction: Int, canLive: Int) { - this.sn = sn - this.lat = lat - this.lon = lon - this.direction = direction - this.canLive = canLive - } -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Center.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Center.kt deleted file mode 100644 index b5c5a909c8..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Center.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.mogo.module.tanlu.model - -/** - * @description - * - * @author lixiaopeng - * @since 2019-10-24 - */ -data class Center ( - val lat: Double,//weidu - val lon: Double -) diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/End.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/End.java deleted file mode 100644 index 4e937f983a..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/End.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.module.tanlu.model; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-09 - */ -public class End { - public Double lat; - public Double lon; - - public End(Double lat, Double lon) { - this.lat = lat; - this.lon = lon; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Information.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Information.java deleted file mode 100644 index 637a7bcf06..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Information.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.mogo.module.tanlu.model; - -import android.os.Parcel; -import android.os.Parcelable; - -import com.mogo.commons.data.BaseData; - -import java.util.ArrayList; - -/** - * @author lixiaopeng - * @description 列表数据 - * @since 2020-01-05 - */ -public class Information extends BaseData implements Parcelable { - public int type; - public Double lon; - public Double lat; - public String addr; - public Long generateTime; - public String cityName; - public ArrayList items; - public int distance; - public String nickName; - public String headImgUrl; - public String phone; - public String trafficInfoType; - - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(Parcel dest, int flags) { - dest.writeInt(this.type); - dest.writeValue(this.lon); - dest.writeValue(this.lat); - dest.writeString(this.addr); - dest.writeValue(this.generateTime); - dest.writeString(this.cityName); - dest.writeTypedList(this.items); - dest.writeInt(this.distance); - dest.writeString(this.nickName); - dest.writeString(this.headImgUrl); - dest.writeString(this.phone); - dest.writeString(this.trafficInfoType); - } - - public Information() { - } - - protected Information(Parcel in) { - this.type = in.readInt(); - this.lon = (Double) in.readValue(Double.class.getClassLoader()); - this.lat = (Double) in.readValue(Double.class.getClassLoader()); - this.addr = in.readString(); - this.generateTime = (Long) in.readValue(Long.class.getClassLoader()); - this.cityName = in.readString(); - this.items = in.createTypedArrayList(Items.CREATOR); - this.distance = in.readInt(); - this.nickName = in.readString(); - this.headImgUrl = in.readString(); - this.phone = in.readString(); - this.trafficInfoType = in.readString(); - } - - public static final Creator CREATOR = new Creator() { - @Override - public Information createFromParcel(Parcel source) { - return new Information(source); - } - - @Override - public Information[] newArray(int size) { - return new Information[size]; - } - }; -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/InformationAndLiveCarResult.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/InformationAndLiveCarResult.java deleted file mode 100644 index d40d7ec8e9..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/InformationAndLiveCarResult.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.mogo.module.tanlu.model; - -import com.mogo.commons.data.BaseData; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-09 - */ -public class InformationAndLiveCarResult extends BaseData { - private Result onTheWayData; - private Result infoMationResult; - private Sns snResult; - - public Result getOnTheWayData() { - return onTheWayData; - } - - public void setOnTheWayData(Result onTheWayData) { - this.onTheWayData = onTheWayData; - } - - public Result getInfoMationResult() { - return infoMationResult; - } - - public void setInfoMationResult(Result infoMationResult) { - this.infoMationResult = infoMationResult; - } - - public Sns getSnResult() { - return snResult; - } - - public void setSnResult(Sns snResult) { - this.snResult = snResult; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Items.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Items.kt deleted file mode 100644 index 444c53b240..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Items.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.mogo.module.tanlu.model - -import android.os.Parcel -import android.os.Parcelable - -class Items(var url: String? = null, var thumbnail: String? = null) : Parcelable { - constructor(parcel: Parcel) : this( - parcel.readString(), - parcel.readString() - ) { - } - - override fun writeToParcel(parcel: Parcel, flags: Int) { - parcel.writeString(url) - parcel.writeString(thumbnail) - } - - override fun describeContents(): Int { - return 0 - } - - companion object CREATOR : Parcelable.Creator { - override fun createFromParcel(parcel: Parcel): Items { - return Items(parcel) - } - - override fun newArray(size: Int): Array { - return arrayOfNulls(size) - } - } - - -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/LocationCarsWithRadius.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/LocationCarsWithRadius.kt deleted file mode 100644 index f853fe51bb..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/LocationCarsWithRadius.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.mogo.module.tanlu.model - -class LocationCarsWithRadius { - var coordinates: List - var radius: Int - var type: String - var keyWord: String? = null - - constructor(coordinates: List, radius: Int, type: String, keyWord: String) { - this.coordinates = coordinates - this.radius = radius - this.type = type - this.keyWord = keyWord - } - - constructor(coordinates: List, radius: Int, type: String) { - this.coordinates = coordinates - this.radius = radius - this.type = type - } -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLng.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLng.java deleted file mode 100644 index a24ea22360..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLng.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.mogo.module.tanlu.model; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-09 - */ -public class NaviLatLng { - public Start start; - public End end; - - NaviLatLng(Start start, End end) { - this.start = start; - this.end = end; - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLngInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLngInfo.java deleted file mode 100644 index 086f98a538..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLngInfo.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.mogo.module.tanlu.model; - -import java.io.Serializable; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-09 - */ -public class NaviLatLngInfo implements Serializable { - public String FromPoiLatitude = ""; - public String FromPoiLongitude = ""; - public String ToPoiLatitude = ""; - public String ToPoiLongitude= ""; - - public Start fromStart() { - return new Start(Double.parseDouble(FromPoiLatitude), Double.parseDouble(FromPoiLongitude)); - } - - public End toEnd() { - return new End(Double.parseDouble(ToPoiLatitude), Double.parseDouble(ToPoiLongitude)); - } - - public String getFromPoiLatitude() { - return FromPoiLatitude; - } - - public void setFromPoiLatitude(String fromPoiLatitude) { - FromPoiLatitude = fromPoiLatitude; - } - - public String getFromPoiLongitude() { - return FromPoiLongitude; - } - - public void setFromPoiLongitude(String fromPoiLongitude) { - FromPoiLongitude = fromPoiLongitude; - } - - public String getToPoiLatitude() { - return ToPoiLatitude; - } - - public void setToPoiLatitude(String toPoiLatitude) { - ToPoiLatitude = toPoiLatitude; - } - - public String getToPoiLongitude() { - return ToPoiLongitude; - } - - public void setToPoiLongitude(String toPoiLongitude) { - ToPoiLongitude = toPoiLongitude; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLngInfo.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLngInfo.kt deleted file mode 100644 index b4d7c77b88..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLngInfo.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.mogo.module.tanlu.model - -import java.io.Serializable - -fun NaviLatLngInfo.fromStart(): Start { - return Start(FromPoiLatitude.toDouble(), FromPoiLongitude.toDouble()) -} - -fun NaviLatLngInfo.toEnd(): End { - return End(ToPoiLatitude.toDouble(), ToPoiLongitude.toDouble()) -} - -class NaviLatLngInfo1 : Serializable { - var FromPoiLatitude: String = "" - var FromPoiLongitude: String = "" - var ToPoiLatitude: String = "" - var ToPoiLongitude: String = "" - -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviResult.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviResult.java deleted file mode 100644 index 3f25edee5c..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviResult.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.mogo.module.tanlu.model; - -import com.mogo.commons.data.BaseData; - -import java.util.List; - -/** - * @author lixiaopeng - * @description 导航沿途数据 - * @since 2020-02-03 - */ -public class NaviResult extends BaseData { - - private Result result; - - public Result getResult() { - return result; - } - - public void setResult(Result result) { - this.result = result; - } - - public static class Result { - private List informations; - - public List getInformations() { - return informations; - } - - public void setInformations(List informations) { - this.informations = informations; - } - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviRoadRequest.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviRoadRequest.java deleted file mode 100644 index f62763b6b2..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviRoadRequest.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.mogo.module.tanlu.model; - -import java.util.List; - -/** - * @author lixiaopeng - * @description - * @since 2020-02-03 - */ -public class NaviRoadRequest { - public List coordinates; - public int limit; - - public NaviRoadRequest(List coordinates, int limit) { - this.coordinates = coordinates; - this.limit = limit; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/PathLineResult.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/PathLineResult.java deleted file mode 100644 index 3cc9bceba6..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/PathLineResult.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.mogo.module.tanlu.model; - -import com.mogo.commons.data.BaseData; -import java.util.List; - -/** - * @author lixiaopeng - * @description 通勤族划线 - * @since 2020-01-08 - */ -public class PathLineResult extends BaseData { - - private PathResult result; - - public PathResult getResult() { - return result; - } - - public void setResult(PathResult result) { - this.result = result; - } - - public static class PathResult { - private List informations; - private List

pointList; - - public List getInformations() { - return informations; - } - - public void setInformations(List informations) { - this.informations = informations; - } - - public List
getPointList() { - return pointList; - } - - public void setPointList(List
pointList) { - this.pointList = pointList; - } - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Result.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Result.java deleted file mode 100644 index 4c3f4aeabd..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Result.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.mogo.module.tanlu.model; - -import com.mogo.commons.data.BaseData; - -import java.util.List; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-08 - */ -public class Result extends BaseData { - public List informations; - - public List getInformations() { - return informations; - } - - public void setInformations(List informations) { - this.informations = informations; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/SearchOnlineInfo.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/SearchOnlineInfo.kt deleted file mode 100644 index bd80487735..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/SearchOnlineInfo.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.mogo.module.tanlu.model - -data class SearchOnlineInfo( - val address: String, - val cityId: String, - val size: Int, -// val radius: Int, - val center: Center, - val adcode: String -) diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Sns.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Sns.kt deleted file mode 100644 index 2ea9c8ebe7..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Sns.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.mogo.module.tanlu.model - - -class Sns { - - var sns: List - var localUserId: String - var localNickName: String - var localHeadImgUrl: String - - constructor(sns: List, localUserId: String, localNickName: String, localHeadImgUrl: String) { - this.sns = sns - this.localUserId = localUserId - this.localNickName = localNickName - this.localHeadImgUrl = localHeadImgUrl - } -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Start.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Start.java deleted file mode 100644 index 1e43cb6883..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Start.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.module.tanlu.model; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-09 - */ -public class Start { - public Double lat; - public Double lon; - - public Start(Double lat, Double lon) { - this.lat = lat; - this.lon = lon; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/TanluModelData.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/TanluModelData.java deleted file mode 100644 index 24e6d147a6..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/TanluModelData.java +++ /dev/null @@ -1,348 +0,0 @@ -package com.mogo.module.tanlu.model; - -import android.content.Context; -import android.util.Log; - -import com.alibaba.android.arouter.launcher.ARouter; -import com.google.gson.Gson; -import com.mogo.commons.data.BaseData; -import com.mogo.commons.debug.DebugConfig; -import com.mogo.commons.network.ParamsProvider; -import com.mogo.commons.network.SubscribeImpl; -import com.mogo.commons.network.Utils; -import com.mogo.map.MogoLatLng; -import com.mogo.module.tanlu.callback.AlongTheWayCallback; -import com.mogo.module.tanlu.callback.NaviCallback; -import com.mogo.module.tanlu.callback.RoadLineCallback; -import com.mogo.module.tanlu.callback.UploadShareCallback; -import com.mogo.module.tanlu.callback.VoiceSearchCallback; -import com.mogo.module.tanlu.constant.HttpConst; -import com.mogo.module.tanlu.constant.TanluConstants; -import com.mogo.module.tanlu.net.TanluApiService; -import com.mogo.service.MogoServicePaths; -import com.mogo.service.network.IMogoNetwork; -import com.mogo.utils.logger.Logger; -import com.mogo.utils.network.RequestOptions; -import com.mogo.utils.storage.SharedPrefsMgr; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import io.reactivex.android.schedulers.AndroidSchedulers; -import io.reactivex.schedulers.Schedulers; - -import static com.mogo.commons.network.Utils.getSn; - -/** - * @author lixiaopeng - * @description 探路接口数据处理 - * @since 2020-01-09 - */ -public class TanluModelData { - - private final Context mContext; - private TanluApiService mTanluApiService; - private static final String TAG = "TanluModelData"; - - public TanluModelData(Context context) { - Logger.d(TAG, "TanluModelData ------->"); - this.mContext = context; - IMogoNetwork network = (IMogoNetwork) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICES_NETWORK).navigation(context); - mTanluApiService = network.create(TanluApiService.class, DebugConfig.getNetMode() == 3 ? HttpConst.HOST_PRODUCT : HttpConst.HOST_TEST); - } - - /** - * 声音控制道理数据 - */ - public void getVoiceControlRoadData(String keywords, String cityId, Double lon, Double lat, - String adCode, final VoiceSearchCallback callback) { - Gson gson = new Gson(); - SearchOnlineInfo searchOnlineInfo = new SearchOnlineInfo(keywords, cityId, 50, new Center(lat, lon), adCode); - String searchInformationStr = gson.toJson(searchOnlineInfo); - - List list = new ArrayList<>(); - list.add(lon); - list.add(lat); - LocationCarsWithRadius locCarsWithRadius = new LocationCarsWithRadius(list, 20000, "circle"); - String locCarsWithRadiusStr = gson.toJson(locCarsWithRadius); - Logger.d(TAG, "getVoiceControlRoadData -------> " + getSn()); - - final Map params = new ParamsProvider.Builder(mContext) - .append("sn", Utils.getSn()) - .append("data", searchInformationStr) - .append("getSnData", locCarsWithRadiusStr) - .build(); - mTanluApiService.searchOnLineInformation(params) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl(RequestOptions.create(mContext)) { - @Override - public void onSuccess(VoiceSearchResult o) { - super.onSuccess(o); - callback.onSuccess(o); - Logger.d(TAG, "getVoiceControlRoadData onSuccess ------>"); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onFail(message, code); - Logger.e(TAG, "getVoiceControlRoadData onError message= " + message + ">>code =" + code); - } - - @Override - public void onError(Throwable e) { - super.onError(e); - Logger.d(TAG, "getVoiceControlRoadData onError ------> e= " + e.getMessage()); - } - }); - } - - - /** - * 通勤族 事件,监听消息自己请求路线数据 ZD821C1933L00974 query.get("sn") - */ - public void getRoadLineData(final RoadLineCallback callback) { - Logger.d(TAG, "getRoadLineData -------> =" + Utils.getSn()); - final Map params = new ParamsProvider.Builder(mContext) - .append("sn", Utils.getSn()) - .build(); - - mTanluApiService.getRoadLineInfo(params) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl(RequestOptions.create(mContext)) { - @Override - public void onSuccess(PathLineResult o) { - super.onSuccess(o); - callback.onSuccess(o); - Logger.d(TAG, "getRoadLineData onSuccess ------>"); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onFail(message, code); - Logger.e(TAG, "getRoadLineData onError message= " + message + ">>code =" + code); - } - - @Override - public void onError(Throwable e) { - super.onError(e); - e.printStackTrace(); - Logger.d(TAG, "getRoadLineData onError ------> e= " + e.getMessage()); - } - }); - - } - - /** - * 导航路径,监听消息自己请求路线数据 ZD821C1933L00974 - */ - public void getNaviRoadLineInfo(final RoadLineCallback callback) { - Logger.d(TAG, "getNaviRoadLineInfo -------> =" + Utils.getSn()); - final Map params = new ParamsProvider.Builder(mContext) - .append("sn", Utils.getSn()) - .build(); - - mTanluApiService.getNaviRoadLineInfo(params) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl(RequestOptions.create(mContext)) { - @Override - public void onSuccess(PathLineResult o) { - super.onSuccess(o); - callback.onSuccess(o); - Logger.d(TAG, "getNaviRoadLineInfo onSuccess ------>"); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onFail(message, code); - Logger.e(TAG, "getNaviRoadLineInfo onError message= " + message + ">>code =" + code); - } - - @Override - public void onError(Throwable e) { - super.onError(e); - e.printStackTrace(); - Logger.d(TAG, "getNaviRoadLineInfo onError ------> e= " + e.getMessage()); - } - }); - - } - - - /** - * 导航路线数据事件 TODO - */ - public void getNavigationLineData(Double lon, Double lat, final AlongTheWayCallback callback) { - Gson gson = new Gson(); - NaviLatLng coordinates = new NaviLatLng(getNaviInfo(lon, lat).fromStart(), getNaviInfo(lon, lat).toEnd()); - Logger.d(TAG, "getNavigationLineData -------> " + getSn()); - - List list = new ArrayList<>(); - list.add(lon); - list.add(lat); - LocationCarsWithRadius locCarsWithRadius = new LocationCarsWithRadius(list, 20000, "circle"); - String locCarsWithRadiusStr = gson.toJson(locCarsWithRadius); - - final Map params = new ParamsProvider.Builder(mContext) - .append("onTheWayData", gson.toJson(coordinates)) - .append("getSnData", locCarsWithRadiusStr) - .build(); - - mTanluApiService.requestInformationAlongTheWay(Utils.getSn(), params) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl(RequestOptions.create(mContext)) { - @Override - public void onSuccess(InformationAndLiveCarResult data) { - super.onSuccess(data); - callback.onSuccess(data); - Logger.d(TAG, "getNavigationLineData onSuccess ------>"); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onFail(message, code); - Logger.e(TAG, "getNavigationLineData onError message= " + message + ">>code =" + code); - } - - @Override - public void onError(Throwable e) { - super.onError(e); - Logger.d(TAG, "getNavigationLineData onError ------> e= " + e.getMessage()); - } - - }); - } - - - /** - * 获取Location,如果没有location数据为空,则使用首次或者上次定位点,并且更新SP,需要抽取公共方法 - */ - public NaviLatLngInfo getNaviInfo(Double lon, Double lat) { - String naviInfo = SharedPrefsMgr.getInstance(mContext).getString(TanluConstants.NAVI_INFO); - Log.d(TAG, " getNaviInfo naviInfo =" + naviInfo); - NaviLatLngInfo naviLatLngInfo = new Gson().fromJson(naviInfo, NaviLatLngInfo.class); - Log.d(TAG, "getLocNaviInfo lat = $lat -----> lon = $lon"); - if (naviLatLngInfo != null) { - if (lon == 0.0 || lat == 0.0) { - return naviLatLngInfo; - } else { - naviLatLngInfo.setFromPoiLatitude(lat + ""); - naviLatLngInfo.setFromPoiLongitude(lon + ""); - SharedPrefsMgr.getInstance(mContext).putString(TanluConstants.NAVI_INFO, new Gson().toJson(naviLatLngInfo)); - return naviLatLngInfo; - } - } else { - return null; - } - } - - - /** - * 上报交通检查和封路 - */ - public void addTrafficCheckInfo(String poiType, String poiImgUrl, String nickname, String headImgUrl, - double lat, double lon, String address, final UploadShareCallback callback) { - Gson gson = new Gson(); - UploadShareRoadInfo uploadShareRoadInfo = new UploadShareRoadInfo(poiType, poiImgUrl, nickname, headImgUrl, new Center(lat, lon), address); - String uploadShareStr = gson.toJson(uploadShareRoadInfo); - Logger.d(TAG, "addTrafficCheckInfo sn= " + getSn() + ">> uploadShareStr =" + uploadShareStr); - final Map params = new ParamsProvider.Builder(mContext) - .append("sn", Utils.getSn()) - .append("data", uploadShareStr) - .build(); - mTanluApiService.uploadCheckTrafficInfor(params) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl(RequestOptions.create(mContext)) { - @Override - public void onSuccess(BaseData o) { - super.onSuccess(o); - callback.onSuccess(o); - Logger.d(TAG, "addTrafficCheckInfo onSuccess ------>"); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onFail(message, code); - Logger.e(TAG, "addTrafficCheckInfo onError message= " + message + ">>code =" + code); - } - - @Override - public void onError(Throwable e) { - super.onError(e); - e.printStackTrace(); - Logger.d(TAG, "addTrafficCheckInfo onError ------> e= " + e.getMessage()); - } - }); - - } - - /** - * 组装需要的请求list - * - * @return - */ - private List getLatLngRequest(List latLnglist) { - List resultList = new ArrayList<>(); - for (int i = 0; i < latLnglist.size(); i++) { - resultList.add(latLnglist.get(i).lng + "," + latLnglist.get(i).lat); - } - - return resultList; - } - - /** - * 获取导航沿途情报 - */ - public void getNaviInformation(List mogoLatLnglist, final NaviCallback callback) { - Gson gson = new Gson(); - if (mogoLatLnglist == null) { - return; - } - - NaviRoadRequest naviRoadRequest = new NaviRoadRequest(getLatLngRequest(mogoLatLnglist), 10); - String naviStr = gson.toJson(naviRoadRequest); - Log.d(TAG, "getNaviInformation naviStr = " + naviStr); - final Map params = new ParamsProvider.Builder(mContext) - .append("sn", Utils.getSn()) - .append("data", naviStr) - .build(); - - mTanluApiService.getNaviInformation(params) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl(RequestOptions.create(mContext)) { - @Override - public void onSuccess(NaviResult o) { - super.onSuccess(o); - callback.onSuccess(o); - Logger.d(TAG, "getNaviInformation onSuccess ------>"); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onFail(message, code); - Logger.e(TAG, "getNaviInformation onError message= " + message + ">>code =" + code); - } - - @Override - public void onError(Throwable e) { - super.onError(e); - e.printStackTrace(); - Logger.d(TAG, "getNaviInformation onError ------> e= " + e.getMessage()); - } - }); - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/UploadShareRoadInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/UploadShareRoadInfo.java deleted file mode 100644 index e8e69d6650..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/UploadShareRoadInfo.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.mogo.module.tanlu.model; - -/** - * @author lixiaopeng - * @description 分享上报信息参数 - * @since 2020-01-16 - */ -public class UploadShareRoadInfo { - - public String poiType; - public String poiImgUrl; - public String nickname; - public String headImgUrl; - private Center location; - private String address; - - public UploadShareRoadInfo(String poiType, String poiImgUrl, String nickname, - String headImgUrl, Center location, String address) { - this.poiType = poiType; - this.poiImgUrl = poiImgUrl; - this.nickname = nickname; - this.headImgUrl = headImgUrl; - this.location = location; - this.address = address; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/VoiceSearchResult.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/VoiceSearchResult.java deleted file mode 100644 index 086957fc6b..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/VoiceSearchResult.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.mogo.module.tanlu.model; - -import com.mogo.commons.data.BaseData; -import java.util.List; - -/** - * @author lixiaopeng - * @description 声音控制接口 - * @since 2020-01-08 - */ -public class VoiceSearchResult extends BaseData { - - private Result result; - - public Result getResult() { - return result; - } - - public void setResult(Result result) { - this.result = result; - } - - public static class Result { - private List informations; - private String description; - private Sns snResult; - - public List getInformations() { - return informations; - } - - public void setInformations(List informations) { - this.informations = informations; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Sns getSnResult() { - return snResult; - } - - public void setSnResult(Sns snResult) { - this.snResult = snResult; - } - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/MarkerInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/MarkerInfo.java deleted file mode 100644 index d5d8b1afd6..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/MarkerInfo.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.mogo.module.tanlu.model.event; - -import java.io.Serializable; - -/** - * @author lixiaopeng - * @description marker数据 - * @since 2020-01-08 - */ -public class MarkerInfo implements Serializable { - public String type; //封路,还是上报 - public String imageUrl; //上传完cos图片 - public double lon; //经度 - public double lat; //纬度 - - public MarkerInfo(String type, String imageUrl, double lon, double lat) { - this.type = type; - this.imageUrl = imageUrl; - this.lon = lon; - this.lat = lat; - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/PushTypeInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/PushTypeInfo.java deleted file mode 100644 index 52c23ebdda..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/PushTypeInfo.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.mogo.module.tanlu.model.event; - -import java.io.Serializable; - -/** - * @author lixiaopeng - * @description push区分类别 - * @since 2020-01-08 - */ -public class PushTypeInfo implements Serializable { - public String type; - - public PushTypeInfo(String type) { - this.type = type; - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/SharedialogEvent.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/SharedialogEvent.java deleted file mode 100644 index 3911fd8ea1..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/SharedialogEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.mogo.module.tanlu.model.event; - -/** - * @author lixiaopeng - * @description 分享弹框事件 - * @since 2020-01-08 - */ -public class SharedialogEvent { - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/VoiceRoadInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/VoiceRoadInfo.java deleted file mode 100644 index 8b93c1ca2e..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/VoiceRoadInfo.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.mogo.module.tanlu.model.event; - -import java.io.Serializable; - -/** - * @author lixiaopeng - * @description marker数据 - * @since 2020-01-08 - */ -public class VoiceRoadInfo implements Serializable { - public String keyword; - public String city; - - public VoiceRoadInfo(String keyword, String city) { - this.keyword = keyword; - this.city = city; - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/global/GlobalSharedInformation.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/global/GlobalSharedInformation.kt deleted file mode 100644 index 280a81b536..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/global/GlobalSharedInformation.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.mogo.module.tanlu.model.global - -import com.mogo.module.tanlu.model.Information -import java.util.ArrayList - -/** - * @author congtaowang - * @since 2019-12-02 - * - * 共享的情报列表,避免在点击大屏查看视频时intent序列化造成的开销 - */ -object GlobalSharedInformation { - - var informationList: ArrayList? = null -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/net/TanluApiService.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/net/TanluApiService.java deleted file mode 100644 index 3cd8b69a87..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/net/TanluApiService.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.mogo.module.tanlu.net; - -import com.mogo.commons.data.BaseData; -import com.mogo.module.tanlu.model.InformationAndLiveCarResult; -import com.mogo.module.tanlu.model.NaviResult; -import com.mogo.module.tanlu.model.PathLineResult; -import com.mogo.module.tanlu.model.VoiceSearchResult; - -import java.util.Map; - -import io.reactivex.Observable; -import retrofit2.http.FieldMap; -import retrofit2.http.FormUrlEncoded; -import retrofit2.http.POST; -import retrofit2.http.Query; - -/** - * @author lixiaopeng - * @description 探路相关接口定义 - * @since 2020-01-07 - */ -public interface TanluApiService { - - /** - * 探路沿途数据,只是为了通知server下发push - */ - @FormUrlEncoded - @POST("deva/car/path/no/getOnTheWayDataAndSn/v1") - Observable requestInformationAlongTheWay(@Query("sn") String sn, @FieldMap Map parameters); - - /** - * 获取上班族路线的坐标集 - */ - @FormUrlEncoded - @POST("yycp-travel-condition/travelDetail/info/no/commuter/v1") - Observable getRoadLineInfo(@FieldMap Map infoBody); - - /** - * 获取导航路线的坐标集 - */ - @FormUrlEncoded - @POST("deva/car/path/no/getOnWayPushData/v1") - Observable getNaviRoadLineInfo(@FieldMap Map infoBody); - - /** - * 基于地理信息词缀的空间情报检索 - */ - @FormUrlEncoded - @POST("deva/car/search/no/searchInforationByAddress/v1") - Observable searchOnLineInformation(@FieldMap Map infoBody); - - /** - * 上报交通检查,封路 - */ - @FormUrlEncoded - @POST("deva/car/poi/no/addNovelty/v1") - Observable uploadCheckTrafficInfor(@FieldMap Map infoBody); - - /** - * 导航沿途情报 - */ - @FormUrlEncoded - @POST("deva/car/search/no/searchInforationByCoordinates/v1") - Observable getNaviInformation(@FieldMap Map infoBody); - - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/MarkerInfoReceiver.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/MarkerInfoReceiver.kt deleted file mode 100644 index 505463804e..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/MarkerInfoReceiver.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.mogo.module.tanlu.receiver - -import android.content.BroadcastReceiver -import android.content.Context -import android.content.Intent -import android.util.Log -import com.mogo.module.tanlu.model.event.MarkerInfo -import org.greenrobot.eventbus.EventBus - -/** - * marker数据接收 - */ -class MarkerInfoReceiver : BroadcastReceiver() { - override fun onReceive(context: Context, intent: Intent) { - if (intent.action == "com.zhidao.roadcondition.marker.info"){ - var type = intent.getStringExtra("type") - var imageUrl = intent.getStringExtra("imageUrl") - var lat = intent.getDoubleExtra("lat",0.0) - var lon = intent.getDoubleExtra("lon",0.0) //经度 - Log.d("MarkerInfoReceiver", "type =" + type + "---->lat =" + lat + "----lon =" + lon + "---imageUrl =" + imageUrl) - EventBus.getDefault().post(MarkerInfo(type, imageUrl,lon, lat)) - } - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/PushReceiver.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/PushReceiver.kt deleted file mode 100644 index 0a9cbf790c..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/PushReceiver.kt +++ /dev/null @@ -1,23 +0,0 @@ -package com.mogo.module.tanlu.receiver - -import android.content.BroadcastReceiver -import android.content.Context -import android.content.Intent -import android.net.Uri -import android.util.Log -import com.mogo.module.tanlu.model.event.PushTypeInfo -import com.mogo.module.tanlu.model.event.VoiceRoadInfo -import org.greenrobot.eventbus.EventBus - -/** - * 导航和通勤族 push的action - */ -class PushReceiver : BroadcastReceiver() { - override fun onReceive(context: Context, intent: Intent) { - if (intent.action == "com.zhidao.roadcondition.split"){ - var uri = Uri.parse(intent.getStringExtra("uri")) - Log.d("PushReceiver", "uri = $uri") - EventBus.getDefault().post(PushTypeInfo(uri.getQueryParameter("type"))) - } - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/ShareDialogReceiver.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/ShareDialogReceiver.java deleted file mode 100644 index 89680cb0c2..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/ShareDialogReceiver.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.mogo.module.tanlu.receiver; - -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.util.Log; - -import com.mogo.module.tanlu.model.event.SharedialogEvent; - -import org.greenrobot.eventbus.EventBus; - -/** - * @author lixiaopeng - * @description - * @since 2020-02-09 - */ -public class ShareDialogReceiver extends BroadcastReceiver { - @Override - public void onReceive(Context context, Intent intent) { - if (intent.getAction() == "com.zhidao.sharedialog") { - EventBus.getDefault().post(new SharedialogEvent()); - } - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/ActivityStatusUtil.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/ActivityStatusUtil.java deleted file mode 100644 index fa9bb7614b..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/ActivityStatusUtil.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.mogo.module.tanlu.util; - -import android.app.ActivityManager; -import android.content.ComponentName; -import android.content.Context; -import android.text.TextUtils; - -import java.util.List; - -import static android.content.Context.ACTIVITY_SERVICE; - -/** - * @author lixiaopeng - * @description - * @since 2019-09-26 - */ -public class ActivityStatusUtil { - /** - * 判断某个activity是否在前台显示 - */ - public static boolean isForeground(Context activity) { - return isForeground(activity, "com.zhidao.roadcondition.main_module.MainActivity"); - } - - /** - * 判断某个界面是否在前台,返回true,为显示,否则不是 - */ - public static boolean isForeground(Context context, String className) { - if (context == null || TextUtils.isEmpty(className)) { - return false; - } - ActivityManager am = (ActivityManager) context.getSystemService(ACTIVITY_SERVICE); - List list = am.getRunningTasks(1); - if (list != null && list.size() > 0) { - ComponentName cpn = list.get(0).topActivity; - if (className.equals(cpn.getClassName())) { - return true; - } else { - - } - } - - return false; - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/DoubleCheckUtil.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/DoubleCheckUtil.kt deleted file mode 100644 index a3a1bf645e..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/DoubleCheckUtil.kt +++ /dev/null @@ -1,29 +0,0 @@ -package com.mogo.module.tanlu.util - - -const val SPACE_TIME = 1000 -var lastClickTime = 0L -var viewId: Int = 0 - -fun isDoubleClick(view: Int): Boolean { - val time = System.currentTimeMillis() - val timeD = time - lastClickTime - if (timeD < SPACE_TIME && viewId == view) { - return true - } - lastClickTime = time - viewId = view - return false -} - - -fun isDoubleClickTime(view: Int,spaceTime:Int): Boolean { - val time = System.currentTimeMillis() - val timeD = time - lastClickTime - if (timeD < spaceTime && viewId == view) { - return true - } - lastClickTime = time - viewId = view - return false -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/HideControl.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/HideControl.kt deleted file mode 100644 index d11c954451..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/HideControl.kt +++ /dev/null @@ -1,71 +0,0 @@ -package com.mogo.module.tanlu.util - -import android.os.Message -import android.view.View -import androidx.constraintlayout.widget.Group - -class HideControl { - - companion object { - const val MSG_HIDE = 0x01 - } - - private var mHideHandler: HideHandler = HideHandler() - var view1: Group? = null - var view2: Group? = null - - val hideRunable = Runnable { - mHideHandler.obtainMessage(MSG_HIDE).sendToTarget() - } - - private inner class HideHandler : android.os.Handler() { - override fun handleMessage(msg: Message) { - super.handleMessage(msg) - when (msg.what) { - MSG_HIDE -> { - view1?.let { - it.visibility = View.GONE - } - view2?.let { - it.visibility = View.GONE - } - } - } - } - - } - - fun startHideTimer(view1: Group,view2: Group? = null) { - this.view1 = view1 - this.view2 = view2 - mHideHandler.removeCallbacks(hideRunable) - if (view1.visibility == View.GONE) { - view1.visibility = View.VISIBLE - } - if (view2?.visibility == View.GONE) { - view2.visibility = View.VISIBLE - } - mHideHandler.postDelayed(hideRunable, 3000) - } - - fun resetHideTimer() { - if(view1 != null){ - view1!!.visibility = View.VISIBLE - } - if(view2 != null){ - view2!!.visibility = View.VISIBLE - } - mHideHandler.removeCallbacks(hideRunable) - mHideHandler.postDelayed(hideRunable, 3000) - } - - fun endHideTime() { - mHideHandler.removeCallbacks(hideRunable) - if (view1 != null) { - view1 = null - } - if (view2 != null) { - view2 = null - } - } -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/StringUitl.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/StringUitl.kt deleted file mode 100644 index bf287acdb0..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/StringUitl.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.mogo.module.tanlu.util - -import android.text.format.DateFormat -import com.google.gson.Gson -import java.text.DecimalFormat - -const val format = "yy/MM/dd kk:mm:ss" - -fun formatDate(time: Long): String { - return DateFormat.format(format, time).toString() -} - -fun convertVar(param: Any?): Any? { - return if (param is String) { - "\"$param\"" - } else { - param - } -} - -//处理距离,大于1000时,四舍五入保留一位小数 -fun handleDistances(distance: Int): String { - if (distance < 1000) { - return distance.toString() + "M" - } else { - var floatDistance = distance.toFloat() - val df = DecimalFormat("0.0") - val transformDistance = floatDistance / 1000 - return (df.format(transformDistance)).toString() + "KM" - } - -} - - - - diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/Utils.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/Utils.java deleted file mode 100644 index 55634d1bb8..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/Utils.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.mogo.module.tanlu.util; - -import java.text.DecimalFormat; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-08 - */ -public class Utils { - - //处理距离,大于1000时,四舍五入保留一位小数 - public static String handleDistance(double distance) { - if (distance < 1000) { - return distance + "M"; - } else { - DecimalFormat df = new DecimalFormat("0.0"); - double transformDistance = distance / 1000; - return (df.format(transformDistance)) + "KM"; - } - } - - //保留整数,四舍五入 - public static int getIntervalValue(int listSize){ -// var floatSize = listSize.toFloat(); - int transformSize = listSize / 15; - DecimalFormat df = new DecimalFormat("0"); - return Integer.parseInt((df.format(transformSize))); - } - -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/FullMediaActivity.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/FullMediaActivity.kt deleted file mode 100644 index be294ba8e2..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/FullMediaActivity.kt +++ /dev/null @@ -1,149 +0,0 @@ -package com.mogo.module.tanlu.video - -import android.app.Activity -import android.content.Intent -import android.os.Bundle -import android.util.Log -import android.view.View -import androidx.appcompat.app.AppCompatActivity -import com.mogo.module.tanlu.R -import com.mogo.module.tanlu.util.HideControl -import com.mogo.module.tanlu.util.formatDate -import com.mogo.utils.logger.Logger -import com.shuyu.gsyvideoplayer.GSYVideoManager -import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder -import kotlinx.android.synthetic.main.tanlu_activity_media_full.* -import java.util.* - -/** - * 全屏显示适配 - */ - -class FullMediaActivity : AppCompatActivity(), View.OnClickListener { - companion object { - const val TAG = "FullMediaActivity" - - const val PARAM_VIDEO_URL = "param_video_url" - const val PARAM_THUMB_URL = "param_thumb_url" - const val PARAM_ADDRESS = "param_address" - const val PARAM_TIME = "generate_time" - - -// fun launch(context: Activity, strategyInfo: List, position: Int) { -// val intent = Intent(context, FullMediaActivity::class.java) -// intent.putExtra(PARAM_MEDIA_POSITION, position) -// // 使用全局静态对象代替,避免序列化开销 -// GlobalSharedInformation.informationList = strategyInfo as ArrayList -// context.startActivityForResult(intent, REQUESTCODE_MAINACTIVITY) -// context.overridePendingTransition(0, 0) -// } - - fun launch(context: Activity, videoUrl: String, thumbnail: String, address: String, generateTime: Long) { - val intent = Intent(context, FullMediaActivity::class.java) - intent.putExtra(PARAM_VIDEO_URL, videoUrl) - intent.putExtra(PARAM_THUMB_URL, thumbnail) - intent.putExtra(PARAM_ADDRESS, address) - intent.putExtra(PARAM_TIME, generateTime) - context.startActivity(intent) - context.overridePendingTransition(0, 0) - } - } - - private var control = HideControl() - private var gsyVideoOptionBuilder = GSYVideoOptionBuilder() - private var videoUrl: String? = null - private var thumbUrl: String? = null - private var address: String? = null - private var generateTime: Long = 0 - - - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.tanlu_activity_media_full) - handleIntent() - setListener() - } - - private fun handleIntent() { - var intent = intent - - videoUrl = intent.getStringExtra(PARAM_VIDEO_URL) - thumbUrl = intent.getStringExtra(PARAM_THUMB_URL) - address = intent.getStringExtra(PARAM_ADDRESS) - generateTime = intent.getLongExtra(PARAM_TIME, 0) - Logger.d("liyz", "FullMediaActivityvideoUrl = $videoUrl --->thumbUrl = $thumbUrl") - Logger.d("liyz", "FullMediaActivity address = $address --->generateTime = $generateTime") - } - - override fun onResume() { - super.onResume() - updateInformation() - GSYVideoManager.onResume() - } - - override fun onPause() { - super.onPause() - GSYVideoManager.onPause() - } - - //需要监听完成事件 - private fun setListener() { - iv_media_back.setOnClickListener(this) - //重置timer - video_view.addSingleClickListener(object : - MediaCoverVideoPlayer.SingleClickListener { - override fun onClick() { - control.resetHideTimer() - } - }) - - //视频播放完成 - video_view.onCompletionListener(object : - MediaCoverVideoPlayer.CompletionListener { - override fun onCompletion() { - Log.d("liyz", "FullMediaActivity ----> onAutoCompletion ") - finish() - } - }) - - video_view - video_view.loadCoverImage(thumbUrl!!) - //设置url,点击播放 - gsyVideoOptionBuilder.setUrl(videoUrl).setCacheWithPlay(true) - .setPlayTag(TAG).build(video_view) - video_view.startButton.performClick() - } - - - private fun updateInformation() { - tv_media_title_content.text = address - tv_media_title_time.text = formatDate(generateTime) - } - - - override fun onClick(view: View) { - view?.let { - when (view) { - iv_media_back -> { - handleBack() - } - } - } - } - - override fun onDestroy() { - super.onDestroy() - GSYVideoManager.releaseAllVideos() - overridePendingTransition(0, 0) - } - - private fun handleBack() { - finish() - } - - override fun onBackPressed() { - super.onBackPressed() - handleBack() - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/MediaCoverVideoPlayer.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/MediaCoverVideoPlayer.kt deleted file mode 100644 index 6beb5337d1..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/MediaCoverVideoPlayer.kt +++ /dev/null @@ -1,162 +0,0 @@ -package com.mogo.module.tanlu.video - -import android.content.Context -import android.util.AttributeSet -import android.util.Log -import android.view.View -import android.widget.ImageView -import android.widget.SeekBar -import com.bumptech.glide.Glide -import com.mogo.module.tanlu.R -import com.shuyu.gsyvideoplayer.GSYVideoManager -import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer -import com.shuyu.gsyvideoplayer.video.base.GSYVideoView -import com.shuyu.gsyvideoplayer.video.base.GSYVideoViewBridge - - -/** - * 全屏播放 - */ -class MediaCoverVideoPlayer : StandardGSYVideoPlayer { - - private lateinit var coverImage: ImageView - private lateinit var start: ImageView - private lateinit var fullscreen: ImageView - private lateinit var singleClickListener: SingleClickListener - private lateinit var completionListener: CompletionListener - - constructor(context: Context?) : super(context) - constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) - constructor(context: Context?, fullFlag: Boolean?) : super(context, fullFlag) - - interface SingleClickListener { - fun onClick() - } - - interface CompletionListener { - fun onCompletion() - } - - override fun init(context: Context) { - super.init(context) - coverImage = findViewById(R.id.thumbImage) - start = findViewById(R.id.start) - fullscreen = findViewById(R.id.fullscreen) - if (mThumbImageViewLayout != null - && (mCurrentState == -1 || mCurrentState == GSYVideoView.CURRENT_STATE_NORMAL || mCurrentState == GSYVideoView.CURRENT_STATE_ERROR) - ) { - mThumbImageViewLayout.visibility = View.VISIBLE - } - } - - fun addSingleClickListener(singleClickListener: SingleClickListener) { - this.singleClickListener = singleClickListener - } - - fun onCompletionListener(completionListener: CompletionListener) { - this.completionListener = completionListener - } - - override fun getLayoutId(): Int { - return R.layout.tanlu_item_video_cover_media - } - - override fun getGSYVideoManager(): GSYVideoViewBridge { - GSYVideoManager.instance().initContext(context.applicationContext) - return GSYVideoManager.instance() - } - - override fun setProgressAndTime(progress: Int, secProgress: Int, currentTime: Int, totalTime: Int, forceChange: Boolean) { - super.setProgressAndTime(progress, secProgress, currentTime, totalTime, forceChange) - if (progress != 0) { - mProgressBar.progress = progress - } - } - - fun loadCoverImage(url: String) { - Glide.with(context) - .load(url) - .into(coverImage) - } - - override fun updateStartImage() { - when (mCurrentState) { - GSYVideoView.CURRENT_STATE_PLAYING -> start.setImageResource(R.drawable.selector_bg_btn_pause) - GSYVideoView.CURRENT_STATE_ERROR -> start.setImageResource(R.mipmap.main_video_refresh_btn) - else -> start.setImageResource(R.drawable.selector_bg_btn_play) - } - } - - fun setFullClickListener(listener: OnClickListener) { - fullscreen.setOnClickListener(listener) - } - - override fun onClickUiToggle() { - super.onClickUiToggle() - singleClickListener.let { - it.onClick() - } - } - - override fun changeUiToCompleteShow() { - super.changeUiToCompleteShow() -// setViewShowState(mBottomContainer, View.INVISIBLE) - } - - override fun onAutoCompletion() { - super.onAutoCompletion() - mProgressBar.progress = 0 - - completionListener.let { - it.onCompletion() - } - - Log.d("liyz", "MediaCoverVideoPlayer onAutoCompletion ------->") - } - - override fun showWifiDialog() { - //直接播放,不显示WIFI对话框 - startPlayLogic() - } - - override fun onClick(v: View?) { - super.onClick(v) - v?.let { - when (v) { - start -> { - - } - else -> { - - } - } - } - } - - override fun onPrepared() { - super.onPrepared() - } - - /** - * 多次回调 - */ - override fun onCompletion() { - super.onCompletion() - } - - - override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) { - super.onProgressChanged(seekBar, progress, fromUser) - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - mFullPauseBitmap?.let { - if (!it.isRecycled) { - it.recycle() - } - } - mFullPauseBitmap = null - } - -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/SimpleCoverVideoPlayer.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/SimpleCoverVideoPlayer.kt deleted file mode 100644 index ffce64b4e6..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/SimpleCoverVideoPlayer.kt +++ /dev/null @@ -1,166 +0,0 @@ -package com.mogo.module.tanlu.video - -import android.content.Context -import android.util.AttributeSet -import android.util.Log -import android.view.Surface -import android.view.View -import android.widget.ImageView -import com.bumptech.glide.Glide -import com.mogo.module.tanlu.R -import com.shuyu.gsyvideoplayer.GSYVideoManager -import com.shuyu.gsyvideoplayer.utils.GSYVideoType -import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer -import com.shuyu.gsyvideoplayer.video.base.GSYVideoView -import com.shuyu.gsyvideoplayer.video.base.GSYVideoViewBridge - - -class SimpleCoverVideoPlayer : StandardGSYVideoPlayer { - private lateinit var coverImage: ImageView - private lateinit var start: ImageView - private lateinit var fullscreen: ImageView - - constructor(context: Context?) : super(context) - constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) - constructor(context: Context?, fullFlag: Boolean?) : super(context, fullFlag) - - override fun init(context: Context) { - super.init(context) - coverImage = findViewById(R.id.thumbImage) - start = findViewById(R.id.start) - fullscreen = findViewById(R.id.fullscreen) - if (mThumbImageViewLayout != null - && (mCurrentState == -1 || mCurrentState == GSYVideoView.CURRENT_STATE_NORMAL || mCurrentState == GSYVideoView.CURRENT_STATE_ERROR) - ) { - mThumbImageViewLayout.visibility = View.VISIBLE - } - } - - override fun getLayoutId(): Int { - return R.layout.tanlu_item_video_cover - } - - override fun getGSYVideoManager(): GSYVideoViewBridge { - GSYVideoManager.instance().initContext(context.applicationContext) - return GSYVideoManager.instance() - } - - override fun setProgressAndTime(progress: Int, secProgress: Int, currentTime: Int, totalTime: Int, forceChange: Boolean) { - super.setProgressAndTime(progress, secProgress, currentTime, totalTime, forceChange) -// Log.e("liyz", "setProgressAndTime progress = $progress --->currentTime = $currentTime --->totalTime = $totalTime") - if (progress != 0) { - mProgressBar.progress = progress - } - } - - fun loadCoverImage(url: String, mContext: Context) { - Glide.with(mContext.applicationContext) - .load(url) - .into(coverImage) - } - - override fun updateStartImage() { - when (mCurrentState) { - GSYVideoView.CURRENT_STATE_PLAYING -> start.setImageResource(R.drawable.selector_bg_btn_pause) - GSYVideoView.CURRENT_STATE_ERROR -> start.setImageResource(R.mipmap.main_video_refresh_btn) - else -> start.setImageResource(R.drawable.selector_bg_btn_play) - } - } - - fun setFullClickListener(listener: OnClickListener) { - fullscreen.setOnClickListener(listener) - } - - override fun changeUiToCompleteShow() { - super.changeUiToCompleteShow() -// setViewShowState(mBottomContainer, View.INVISIBLE) - mBottomContainer.visibility = View.INVISIBLE - Log.d("liyz", "changeUiToCompleteShow ------------>") - } - - override fun hideAllWidget() { - super.hideAllWidget() - mBottomContainer.visibility = View.VISIBLE - } - - override fun changeUiToPrepareingClear() { - super.changeUiToPrepareingClear() - mBottomContainer.visibility = View.VISIBLE - } - - override fun changeUiToPlayingBufferingClear() { - super.changeUiToPlayingBufferingClear() - mBottomContainer.visibility = View.VISIBLE - } - - override fun changeUiToClear() { - super.changeUiToClear() - mBottomContainer.visibility = View.VISIBLE - } - - override fun changeUiToCompleteClear() { - super.changeUiToCompleteClear() - mBottomContainer.visibility = View.INVISIBLE - } - - override fun onAutoCompletion() { - super.onAutoCompletion() - mProgressBar.progress = 0 - } - - override fun showWifiDialog() { - //直接播放,不显示WIFI对话框 - startPlayLogic() - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - mProgressBar.progress = 0 - mFullPauseBitmap = null - } - - override fun onClick(v: View?) { - super.onClick(v) - v?.let { - when (v) { - start -> { - - } - else -> { - - } - } - } - } - - override fun onPrepared() { - super.onPrepared() - } - - override fun onCompletion() { - - } - - override fun onSurfaceUpdated(surface: Surface) { - super.onSurfaceUpdated(surface) - if (mThumbImageViewLayout != null && mThumbImageViewLayout.visibility == View.VISIBLE) { - mThumbImageViewLayout.visibility = View.INVISIBLE - } - } - - override fun setViewShowState(view: View?, visibility: Int) { - if (view === mThumbImageViewLayout && visibility != View.VISIBLE) { - return - } - super.setViewShowState(view, visibility) - } - - override fun onSurfaceAvailable(surface: Surface) { - super.onSurfaceAvailable(surface) - if (GSYVideoType.getRenderType() != GSYVideoType.TEXTURE) { - if (mThumbImageViewLayout != null && mThumbImageViewLayout.visibility == View.VISIBLE) { - mThumbImageViewLayout.visibility = View.INVISIBLE - } - } - } -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/VideoInit.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/VideoInit.kt deleted file mode 100644 index 6b98b7c203..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/VideoInit.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.mogo.module.tanlu.video - -import com.shuyu.gsyvideoplayer.GSYVideoManager -import com.shuyu.gsyvideoplayer.cache.CacheFactory -import com.shuyu.gsyvideoplayer.cache.ProxyCacheManager -import com.shuyu.gsyvideoplayer.model.VideoOptionModel -import com.shuyu.gsyvideoplayer.player.IjkPlayerManager -import com.shuyu.gsyvideoplayer.player.PlayerFactory -import com.shuyu.gsyvideoplayer.utils.GSYVideoType -import tv.danmaku.ijk.media.player.IjkMediaPlayer - - -fun initVideo() { - PlayerFactory.setPlayManager(IjkPlayerManager::class.java) - CacheFactory.setCacheManager(ProxyCacheManager::class.java) - var list = mutableListOf() - list.add(VideoOptionModel(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "enable-accurate-seek", 1)) - list.add(VideoOptionModel(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "videotoolbox", 0)) - GSYVideoManager.instance().optionModelList = list - GSYVideoType.enableMediaCodec() - GSYVideoType.enableMediaCodecTexture() -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/AutoZoomInImageView.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/AutoZoomInImageView.java deleted file mode 100644 index cd34a35832..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/AutoZoomInImageView.java +++ /dev/null @@ -1,274 +0,0 @@ -package com.mogo.module.tanlu.view; - -import com.mogo.service.imageloader.MogoImageView; - -import android.animation.Animator; -import android.animation.ValueAnimator; -import android.content.Context; -import android.graphics.Matrix; -import android.graphics.drawable.Drawable; -import android.util.AttributeSet; -import android.view.View; - - -/** - * @author lixiaopeng - * @description - * @since 2020-01-06 - */ -public class AutoZoomInImageView extends MogoImageView { - private int mDrawableW; - private int mDrawableH; - private int mImageViewW; - private int mImageViewH; - private long mDurationMillis = 700; - - private float[] mValues = new float[9]; - private float mScaleDelta = 0.2f; - - private Drawable mDrawable; - private Matrix mMatrix; - - public AutoZoomInImageView(Context context) { - super(context); - this.setScaleType(ScaleType.MATRIX); - } - - public AutoZoomInImageView(Context context, AttributeSet attrs) { - super(context, attrs); - this.setScaleType(ScaleType.MATRIX); - } - - public AutoZoomInImageView(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - this.setScaleType(ScaleType.MATRIX); - } - - public AutoZoomInImageView init() { - initInternalValues(); - initPicturePosition(); - return this; - } - - public void init(Drawable drawable) { - initInternalValues(drawable); - initPicturePosition(); - } - - private void initInternalValues() { - mDrawable = getDrawable(); - - if (mDrawable == null) { - throw new IllegalArgumentException("please set the source of AutoZoomInImageView"); - } - - mDrawableW = mDrawable.getIntrinsicWidth(); - mDrawableH = mDrawable.getIntrinsicHeight(); - - mImageViewW = getMeasuredWidth(); - mImageViewH = getMeasuredHeight(); - - mMatrix = getImageMatrix(); - mMatrix.getValues(mValues); - } - - private void initInternalValues(Drawable drawable) { - mDrawable = drawable; - - if (mDrawable == null) { - throw new IllegalArgumentException("please set the source of AutoZoomInImageView"); - } - - mDrawableW = mDrawable.getIntrinsicWidth(); - mDrawableH = mDrawable.getIntrinsicHeight(); - - mImageViewW = getMeasuredWidth(); - mImageViewH = getMeasuredHeight(); - - mMatrix = getImageMatrix(); - mMatrix.getValues(mValues); - } - - private void initPicturePosition() { - updateMatrixValuesOrigin(mMatrix, mValues, mDrawableW, mDrawableH, mImageViewW, mImageViewH); - setImageMatrix(mMatrix); - } - - private ValueAnimator mCurrentAnimator; - - private void startZoomInByScaleDelta(final float scaleDelta, long duration) { - - final float oriScaleX = mValues[0]; - final float oriScaleY = mValues[4]; - - mCurrentAnimator = ValueAnimator.ofFloat(0, scaleDelta); - mCurrentAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { - - @Override - public void onAnimationUpdate(ValueAnimator animation) { - float value = (Float) animation.getAnimatedValue(); - if (mOnZoomListener != null) - mOnZoomListener.onUpdate(AutoZoomInImageView.this, value / scaleDelta); - updateMatrixValuesSpan(mValues, mDrawableW, mDrawableH, mImageViewW, mImageViewH, - oriScaleX, oriScaleY, value); - mMatrix.setValues(mValues); - setImageMatrix(mMatrix); - } - }); - mCurrentAnimator.addListener(new Animator.AnimatorListener() { - @Override - public void onAnimationStart(Animator animation) { - if (mOnZoomListener != null) mOnZoomListener.onStart(AutoZoomInImageView.this); - } - - @Override - public void onAnimationEnd(Animator animation) { - if (mOnZoomListener != null) mOnZoomListener.onEnd(AutoZoomInImageView.this); - mCurrentAnimator = null; - } - - @Override - public void onAnimationCancel(Animator animation) { - mCurrentAnimator = null; - } - - @Override - public void onAnimationRepeat(Animator animation) { - } - }); - mCurrentAnimator.setDuration(duration); - mCurrentAnimator.start(); - } - - /** - * 停止动画 - */ - public void stopCurrentAnimator(){ - if ( mCurrentAnimator != null ) { - if ( mCurrentAnimator.isRunning() ) { - mCurrentAnimator.cancel(); - } - } - } - - /** - * start zooming in - * - * @param scaleDelta the scale that the image will add to original scale - * @param durationMillis the duration of zoomin animation, in millisecond. - * @param delayMillis the delayed time of starting zoomin animation, in millisecond. - */ - public void startZoomInByScaleDeltaAndDuration(final float scaleDelta, final long durationMillis, long delayMillis) { - if (scaleDelta < 0) { - throw new IllegalArgumentException("scaleDelta should be larger than 0, now scaleDelta is " + scaleDelta); - } - if (durationMillis < 0) { - throw new IllegalArgumentException("durationMillis should not be less than 0, now durationMillis is " + durationMillis); - } - if (delayMillis < 0) { - throw new IllegalArgumentException("delayMillis should not be less than 0, now delayMillis is " + delayMillis); - } - postDelayed(new Runnable() { - @Override - public void run() { - startZoomInByScaleDelta(scaleDelta, durationMillis); - } - }, delayMillis); - } - - /** - * the scale that the image will add to original scale - * - * @param scaleDelta - * @return - */ - public AutoZoomInImageView setScaleDelta(float scaleDelta) { - mScaleDelta = scaleDelta; - return this; - } - - /** - * the duration of zoomin animation, in millisecond. - * - * @param durationMillis - * @return - */ - public AutoZoomInImageView setDurationMillis(long durationMillis) { - mDurationMillis = durationMillis; - return this; - } - - /** - * callback when zoomin animation finished - * - * @param onZoomListener - * @return - */ - public AutoZoomInImageView setOnZoomListener(OnZoomListener onZoomListener) { - mOnZoomListener = onZoomListener; - return this; - } - - /** - * start animation of zoomin - * - * @param delayMillis the delayed time of starting zoomin animation, in millisecond. - */ - public void start(long delayMillis) { - postDelayed(new Runnable() { - @Override - public void run() { - startZoomInByScaleDelta(mScaleDelta, mDurationMillis); - } - }, delayMillis); - } - - private void updateMatrixValuesOrigin(Matrix outMatrix, float[] outValues, float drawW, float drawH, float imageW, float imageH) { - if (outMatrix == null || outValues == null) { - throw new IllegalArgumentException("please set the source of AutoZoomInImageView's matrix and values"); - } - outMatrix.reset(); - if ((imageH * drawW > drawH * imageW)) { - float scale1 = (imageH) / (drawH); - float offset1 = (drawW * scale1 - imageW) / 2; - outMatrix.postScale(scale1, scale1); - outMatrix.postTranslate(-offset1, 0); - } else { - float scale2 = (imageW) / (drawW); - float offset2 = (drawH * scale2 - imageH) / 2; - outMatrix.postScale(scale2, scale2); - outMatrix.postTranslate(0, -offset2); - } - outMatrix.getValues(outValues); - } - - private void updateMatrixValuesSpan(float[] outValues, - float drawW, float drawH, - float imageW, float imageH, - float oriScaleX, float oriScaleY, - float scaleDelta) { - outValues[0] = oriScaleX * (1 + scaleDelta); - outValues[4] = oriScaleY * (1 + scaleDelta); - float offsetwidth = (drawW * outValues[0] - imageW) / 2; - outValues[2] = -offsetwidth; - float offsetHeight = (drawH * outValues[4] - imageH) / 2; - outValues[5] = -offsetHeight; - } - - private OnZoomListener mOnZoomListener; - - public interface OnZoomListener { - /** - * callback when zoom in animation is updating - * - * @param view AutoZoomInImageView - * @param progress return the progress of animation, scope is [0,1] - */ - void onUpdate(View view, float progress); - - void onEnd(View view); - - void onStart(View view); - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/voice/VoiceController.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/voice/VoiceController.kt deleted file mode 100644 index 5b623fb41f..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/voice/VoiceController.kt +++ /dev/null @@ -1,57 +0,0 @@ -package com.mogo.module.tanlu.voice - -import com.zhidao.auto.platform.voice.VoiceClient - -/** - * @description 声音控制类 - * - * @author lixiaopeng - * @since 2019-11-01 - */ -object VoiceController { - private lateinit var voiceClient: VoiceClient - -// fun initVoice() { -// voiceClient = VoiceClient.getInstance(BaseApplication.getAppContext()) -// } - - /** - * 设置语音命令回调接口 - * @param callBack - */ - fun setCallBack(callBack: VoiceClient.VoiceCmdCallBack) { - voiceClient.setCallBack(callBack) - } - - /** - * @param speakText 语音播报内容 - */ - fun speakVoice(speakText: String) { - voiceClient.speakDefault(speakText) - } - - /** - * 注册免唤醒命令 - * @param customType 命令 - * @param customWakeupCmd 命令对应的唤醒词集合 - */ - fun registerCustomWakeupCmd(customType: String, customWakeupCmd: Array) { - voiceClient.registerCustomWakeupCmd(customType, customWakeupCmd) - } - - /** - * 取消免唤醒命令 - * @param customType 命令 - */ - fun unRegisterCustomWakeupCmd(customType: String) { - voiceClient.unRegisterCustomWakeupCmd(customType) - } - - /** - * 释放资源(界面销毁的时候调用) - */ - fun release() { - voiceClient.release() - } - -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/app_icon.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/app_icon.png deleted file mode 100644 index c97be4be12..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/app_icon.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/default_image.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/default_image.png deleted file mode 100644 index fdc210cd25..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/default_image.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/ic_refresh.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/ic_refresh.png deleted file mode 100644 index d86c3f8024..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/ic_refresh.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/ic_snapshot_ph.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/ic_snapshot_ph.png deleted file mode 100644 index 281f1bb163..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/ic_snapshot_ph.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/join_checkbox_bg.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/join_checkbox_bg.png deleted file mode 100755 index 89d00803c5..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/join_checkbox_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/live_exit.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/live_exit.png deleted file mode 100644 index 7d9b50f159..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/live_exit.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/location_city_image.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/location_city_image.png deleted file mode 100644 index ce5515c529..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/location_city_image.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_left_page_up_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_left_page_up_normal.png deleted file mode 100644 index 9c1a2a4aea..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_left_page_up_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_left_page_up_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_left_page_up_press.png deleted file mode 100644 index d927b18877..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_left_page_up_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_right_page_up_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_right_page_up_normal.png deleted file mode 100644 index dda526f475..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_right_page_up_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_right_page_up_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_right_page_up_press.png deleted file mode 100644 index 2289209d9a..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_right_page_up_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_pause_btn_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_pause_btn_normal.png deleted file mode 100644 index 1bdf51b816..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_pause_btn_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_play_btn_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_play_btn_normal.png deleted file mode 100644 index 7cdba55696..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_play_btn_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_view_empty_bg.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_view_empty_bg.png deleted file mode 100644 index 797a159dc6..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_view_empty_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/mainpage_location_img.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/mainpage_location_img.png deleted file mode 100644 index 7a463ac3ab..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/mainpage_location_img.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/map_location_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/map_location_normal.png deleted file mode 100644 index 53f5b5a14a..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/map_location_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/map_location_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/map_location_press.png deleted file mode 100644 index e3e430c8d6..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/map_location_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/media_next.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/media_next.png deleted file mode 100644 index 339d7731ec..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/media_next.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/media_previous.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/media_previous.png deleted file mode 100644 index 7c0e9618fb..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/media_previous.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/not_join_checkbox_bg.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/not_join_checkbox_bg.png deleted file mode 100755 index 663addd255..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/not_join_checkbox_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/public_arrow_back_iv.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/public_arrow_back_iv.png deleted file mode 100644 index cd7159e219..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/public_arrow_back_iv.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/search_information_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/search_information_normal.png deleted file mode 100644 index 69529ef0bd..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/search_information_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/search_information_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/search_information_press.png deleted file mode 100644 index 8338cc95ae..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/search_information_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_logo.png deleted file mode 100755 index 1fc2152cd5..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_logo.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/video_loading_img.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/video_loading_img.png deleted file mode 100644 index 48be2bdd18..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/video_loading_img.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_video_pause_btn_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_video_pause_btn_normal.png deleted file mode 100644 index 12cec3f24a..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_video_pause_btn_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_video_play_btn_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_video_play_btn_normal.png deleted file mode 100644 index 04eabdb9c7..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_video_play_btn_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_view_empty_bg.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_view_empty_bg.png deleted file mode 100644 index f868f58df0..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_view_empty_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/media_next.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/media_next.png deleted file mode 100644 index cfb640f6a3..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/media_next.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/media_previous.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/media_previous.png deleted file mode 100644 index fe7bd3486c..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/media_previous.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_block_up.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_block_up.png deleted file mode 100644 index aa80dfe42f..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_block_up.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_logo.png deleted file mode 100755 index d93e27ece5..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_logo.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_marker_block_up.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_marker_block_up.png deleted file mode 100644 index a934c7a994..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_marker_block_up.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_marker_road_closure.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_marker_road_closure.png deleted file mode 100644 index d399d10169..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_marker_road_closure.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_marker_traffic_check.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_marker_traffic_check.png deleted file mode 100644 index b47d3866ef..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_marker_traffic_check.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_oil_price.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_oil_price.png deleted file mode 100644 index 2d3321bbdc..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_oil_price.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_road_closure.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_road_closure.png deleted file mode 100644 index 7726fc04d4..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_road_closure.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_traffic_check.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_traffic_check.png deleted file mode 100644 index 18e28e06f7..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_traffic_check.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/loading_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/loading_bg.xml deleted file mode 100644 index 8aa748c588..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/loading_bg.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_enlarge.xml b/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_enlarge.xml deleted file mode 100644 index d293f7d7c9..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_enlarge.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_pause.xml b/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_pause.xml deleted file mode 100644 index 5e45e9d00b..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_pause.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_play.xml b/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_play.xml deleted file mode 100644 index 84339617e4..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_play.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_solid_left_page_up.xml b/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_solid_left_page_up.xml deleted file mode 100644 index 5448ebf742..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_solid_left_page_up.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_solid_right_page_up.xml b/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_solid_right_page_up.xml deleted file mode 100644 index a3879591d8..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_solid_right_page_up.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533.xml deleted file mode 100644 index 1776be8082..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_10px.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_10px.xml deleted file mode 100644 index 20526e5a65..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_10px.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_6px_bottom.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_6px_bottom.xml deleted file mode 100644 index 1b882ade41..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_6px_bottom.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_9px.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_9px.xml deleted file mode 100644 index 3ac5215724..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_9px.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_99191c25_4px.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_99191c25_4px.xml deleted file mode 100644 index f459707924..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_99191c25_4px.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/small_video_seekbar_style.xml b/modules/mogo-module-tanlu/src/main/res/drawable/small_video_seekbar_style.xml deleted file mode 100644 index c48724bdd8..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/small_video_seekbar_style.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_gradual_change_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_gradual_change_bg.xml deleted file mode 100644 index 6f95f6d2e9..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_gradual_change_bg.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_activity_media_full.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_activity_media_full.xml deleted file mode 100644 index 83821faa8a..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_activity_media_full.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_fullscreen_video_view_pager.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_fullscreen_video_view_pager.xml deleted file mode 100644 index 231a9ba631..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_fullscreen_video_view_pager.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_main_media_recycler.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_main_media_recycler.xml deleted file mode 100644 index 075a6a8688..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_main_media_recycler.xml +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_video_cover.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_video_cover.xml deleted file mode 100644 index e56381d53e..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_video_cover.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_video_cover_media.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_video_cover_media.xml deleted file mode 100644 index 6e0a947809..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_video_cover_media.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-hdpi/ic_launcher.png b/modules/mogo-module-tanlu/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 898f3ed59a..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-hdpi/ic_launcher_round.png b/modules/mogo-module-tanlu/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index dffca3601e..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/custom_send.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/custom_send.png deleted file mode 100644 index 85e35f9b8f..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/custom_send.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/custom_send_loading.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/custom_send_loading.png deleted file mode 100644 index cd5e91fa7e..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/custom_send_loading.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/custom_send_success.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/custom_send_success.png deleted file mode 100644 index 3666376705..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/custom_send_success.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/ic_launcher.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/ic_launcher.png deleted file mode 100644 index 898f3ed59a..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/ic_launcher.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/ic_launcher_round.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/ic_launcher_round.png deleted file mode 100644 index dffca3601e..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/ic_launcher_round.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_enlarge_btn_normal.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_enlarge_btn_normal.png deleted file mode 100644 index fe005906f2..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_enlarge_btn_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_enlarge_btn_press.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_enlarge_btn_press.png deleted file mode 100644 index fe005906f2..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_enlarge_btn_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_page_title.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_page_title.png deleted file mode 100644 index f83b9643f3..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_page_title.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_upload_info_image.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_upload_info_image.png deleted file mode 100644 index 97b8f14e19..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_upload_info_image.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_video_play_mini.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_video_play_mini.png deleted file mode 100644 index 7e1bd42bfe..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_video_play_mini.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_video_refresh_btn.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_video_refresh_btn.png deleted file mode 100644 index 7f021fc1a9..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/main_video_refresh_btn.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/not_join_checkbox_bg.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/not_join_checkbox_bg.png deleted file mode 100755 index 663addd255..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/not_join_checkbox_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/share_back_image.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/share_back_image.png deleted file mode 100755 index 72305ea904..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/share_back_image.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/splash_confirm_btn.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/splash_confirm_btn.png deleted file mode 100755 index 8e3084a15f..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/splash_confirm_btn.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/splash_confirm_btn_bg.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/splash_confirm_btn_bg.png deleted file mode 100644 index be5d00d302..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/splash_confirm_btn_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/splash_confirm_btn_press.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/splash_confirm_btn_press.png deleted file mode 100755 index de1ed58b95..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/splash_confirm_btn_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/splash_title.png b/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/splash_title.png deleted file mode 100644 index 0169722bb1..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-ldpi/splash_title.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-mdpi/ic_launcher.png b/modules/mogo-module-tanlu/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 64ba76f75e..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-mdpi/ic_launcher_round.png b/modules/mogo-module-tanlu/src/main/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index dae5e08234..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-xhdpi/ic_launcher.png b/modules/mogo-module-tanlu/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index e5ed46597e..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/modules/mogo-module-tanlu/src/main/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 14ed0af350..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/values-ldpi/dimens.xml b/modules/mogo-module-tanlu/src/main/res/values-ldpi/dimens.xml deleted file mode 100644 index 7b5215abfd..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/values-ldpi/dimens.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 56px - 56px - 48px - 48px - 72px - 5px - - 56px - 56px - 96px - 96px - 90px - 700px - 5px - - 72px - 25px - 25px - 16px - 48px - 22px - 700px - - 352px - 12px - 31px - 4px - 1px - 327px - 189px - 10px - 160px - 48px - 22px - 109px - 28px - 45px - 42px - 16px - - - 6px - - - 20px - 14px - 18px - 14px - 15px - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml deleted file mode 100644 index 0b8c28f750..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - 106px - 106px - 48px - 48px - 72px - 5px - - 106px - 106px - 96px - 96px - 100px - 700px - 7px - - 135px - 50px - 50px - 30px - 92px - 40px - 800px - - 660px - 24px - 56px - 8px - 2px - 613px - 355px - 20px - 300px - 90px - 40px - 205px - 50px - 90px - 80px - 32px - - - 10px - - - 38px - 26px - 34px - 26px - 28px - - - - - diff --git a/modules/mogo-module-tanlu/src/main/res/values/colors.xml b/modules/mogo-module-tanlu/src/main/res/values/colors.xml deleted file mode 100644 index 48a00d3b8d..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/values/colors.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - #000000 - #000000 - #1F7FFF - #FFFFFF - #80FFFFFF - #1E212C - #1F7FFF - #171F7FFF - #4d191C25 - #99191C25 - #222533 - #303447 - #323131 - #4B5369 - #9A9A9A - #A2A2A2 - #5a979797 - #80FFFFFF - #00FFFFFF - #b3000000 - #0DFFFFFF - #000000 - #69718B - #213142 - #33FFFFFF - #B3000000 - #0091FF - #d9000000 - #FF1B1B - - #F8F8F8 - #333333 - #DADAE2 - #545362 - #99191C25 - #99666666 - #999999 - #99FFFFFF - #59FFFFFF - - diff --git a/modules/mogo-module-tanlu/src/main/res/values/dimens.xml b/modules/mogo-module-tanlu/src/main/res/values/dimens.xml deleted file mode 100644 index e73ee3984d..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/values/dimens.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - 106px - 106px - 48px - 48px - 72px - 5px - - 106px - 106px - 96px - 96px - 144px - 760px - 7px - - 135px - 50px - 50px - 30px - 92px - 40px - 800px - - 660px - 24px - 58px - 8px - 2px - 613px - 355px - 20px - 300px - 90px - 40px - 205px - 25px - 90px - 80px - 32px - - - 10px - - - 38px - 26px - 34px - 26px - 28px - - - - - diff --git a/modules/mogo-module-tanlu/src/main/res/values/strings.xml b/modules/mogo-module-tanlu/src/main/res/values/strings.xml deleted file mode 100644 index eb1d1412c1..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/values/strings.xml +++ /dev/null @@ -1,36 +0,0 @@ - - tanlu - 返回 - 取消授权 - 《探路共享计划》 - 已同意 - 探路共享计划 >> - 探路APP用户服务协议 - 未找到其他用户分享的拥堵信息,
您可以试试分享拥堵]]>
- 未知区域 - 上报路况 - 正在更新情报数据 - 欢迎使用探路,您可以在探路内查看到周边的实时路况,也可以通过关键词“上报路况”来分享一段视频给其他车主 - 您还可以试试语音上报 - 为您找到%s条路况信息 - 开启小智车联 - 共享计划 - 上一条 - 下一条 - 上传成功 - 上传失败 - 将为您播放 - - - - 正在为您搜索路况 - 探路系统正在为您搜索 - 小智这就去查,您稍等一下 - - - 找不到相关地址 - 找不到地址,是小智不好 - 未找到其他车主分享的路况信息 - - -
diff --git a/settings.gradle b/settings.gradle index 9f50deef77..4747a1bb37 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,7 +9,7 @@ include ':modules:mogo-module-map' include ':modules:mogo-module-common' include ':modules:mogo-module-main' include ':modules:mogo-module-search' -include ':modules:mogo-module-tanlu' +//include ':modules:mogo-module-tanlu' include ':modules:mogo-module-share' include ':modules:mogo-module-service' include ':modules:mogo-module-back' diff --git a/upload.sh b/upload.sh index b6c85e5845..9d0375eb7b 100755 --- a/upload.sh +++ b/upload.sh @@ -10,7 +10,6 @@ ./gradlew :services:mogo-service:clean :services:mogo-service:uploadArchives ./gradlew :modules:mogo-module-common:clean :modules:mogo-module-common:uploadArchives ./gradlew :modules:mogo-module-map:clean :modules:mogo-module-map:uploadArchives -./gradlew :modules:mogo-module-tanlu:clean :modules:mogo-module-tanlu:uploadArchives ./gradlew :modules:mogo-module-apps:clean :modules:mogo-module-apps:uploadArchives ./gradlew :modules:mogo-module-service:clean :modules:mogo-module-service:uploadArchives ./gradlew :modules:mogo-module-share:clean :modules:mogo-module-share:uploadArchives