diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 60282b4b14..407bc58beb 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -27,6 +27,8 @@
+
+
diff --git a/app/build.gradle b/app/build.gradle
index 2ecd91c7ae..1b14cbffa4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -102,6 +102,8 @@ android {
// 使用思必驰语音
buildConfigField 'int', 'AIType','2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
+ // 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
+ buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
}
// e系列,采用Launcher方案
e8xx {
@@ -109,6 +111,8 @@ android {
// 使用思必驰语音
buildConfigField 'int', 'AIType','2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
+ // 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
+ buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
}
// 同上
em4 {
@@ -116,6 +120,8 @@ android {
// 使用思必驰语音
buildConfigField 'int', 'AIType','2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
+ // 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
+ buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
}
// e系列-2+32,对标D系列2+32,采用独立app的形式
em3 {
@@ -123,6 +129,8 @@ android {
// 使用思必驰语音
buildConfigField 'int', 'AIType', '2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
+ // 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
+ buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
}
// e系列-1+16,对标D系列1+16,采用独立app形式
em1 {
@@ -130,6 +138,8 @@ android {
// 使用思必驰语音
buildConfigField 'int', 'AIType', '2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
+ // 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
+ buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
}
// d系列
d8xx {
@@ -137,6 +147,8 @@ android {
// 使用同行者语音
buildConfigField 'int', 'AIType','1'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
+ // 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
+ buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
}
// d系列 1+16 版本
d82x{
@@ -144,6 +156,17 @@ android {
// 使用同行者语音
buildConfigField 'int', 'AIType','1'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
+ // 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
+ buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
+ }
+ // 比亚迪
+ byd{
+ dimension "product"
+ // 不使用语音
+ buildConfigField 'int', 'AIType','0'
+ buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
+ // 车机类型,主要用于区分自研车机还是别人家的车机,其他车机,比亚迪定为1
+ buildConfigField 'int', 'CAR_MACHINE_TYPE', '1'
}
qa {
dimension "env"
@@ -245,6 +268,7 @@ dependencies {
// 事件面板分渠道引用
d82xImplementation rootProject.ext.dependencies.moduleventpanelnoop
em1Implementation rootProject.ext.dependencies.moduleventpanelnoop
+ bydImplementation rootProject.ext.dependencies.moduleventpanelnoop
d8xxImplementation rootProject.ext.dependencies.moduleventpanel
em4Implementation rootProject.ext.dependencies.moduleventpanel
e8xxImplementation rootProject.ext.dependencies.moduleventpanel
@@ -253,12 +277,23 @@ dependencies {
// 左侧面板分渠道引用
d82xImplementation rootProject.ext.dependencies.moduleleftpanel
em1Implementation rootProject.ext.dependencies.moduleleftpanel
+ bydImplementation rootProject.ext.dependencies.moduleleftpanel
d8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop
em4Implementation rootProject.ext.dependencies.moduleleftpanelnoop
e8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop
e8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop
f8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop
em3Implementation rootProject.ext.dependencies.moduleleftpanelnoop
+ // 比亚迪模块引用
+ bydImplementation rootProject.ext.dependencies.modulebyd
+ d82xImplementation rootProject.ext.dependencies.modulebydnoop
+ em1Implementation rootProject.ext.dependencies.modulebydnoop
+ d8xxImplementation rootProject.ext.dependencies.modulebydnoop
+ em4Implementation rootProject.ext.dependencies.modulebydnoop
+ e8xxImplementation rootProject.ext.dependencies.modulebydnoop
+ e8xxImplementation rootProject.ext.dependencies.modulebydnoop
+ f8xxImplementation rootProject.ext.dependencies.modulebydnoop
+ em3Implementation rootProject.ext.dependencies.modulebydnoop
} else {
launcherImplementation project(':main-extensions:mogo-module-main-launcher')
// launcherImplementation project(':modules:mogo-module-main')
@@ -275,6 +310,7 @@ dependencies {
// 事件面板分渠道引用
d82xImplementation project(':modules:mogo-module-event-panel-noop')
em1Implementation project(':modules:mogo-module-event-panel-noop')
+ bydImplementation project(':modules:mogo-module-event-panel-noop')
d8xxImplementation project(':modules:mogo-module-event-panel')
em4Implementation project(':modules:mogo-module-event-panel')
e8xxImplementation project(':modules:mogo-module-event-panel')
@@ -283,11 +319,22 @@ dependencies {
// 左侧面板分渠道引用
d82xImplementation project(':modules:mogo-module-left-panel')
em1Implementation project(':modules:mogo-module-left-panel')
+ bydImplementation project(':modules:mogo-module-left-panel')
d8xxImplementation project(':modules:mogo-module-left-panel-noop')
em4Implementation project(':modules:mogo-module-left-panel-noop')
e8xxImplementation project(':modules:mogo-module-left-panel-noop')
f8xxImplementation project(':modules:mogo-module-left-panel-noop')
em3Implementation project(':modules:mogo-module-left-panel-noop')
+ // 比亚迪模块引用
+ bydImplementation project(':modules:mogo-module-byd')
+ d82xImplementation project(':modules:mogo-module-byd-noop')
+ em1Implementation project(':modules:mogo-module-byd-noop')
+ d8xxImplementation project(':modules:mogo-module-byd-noop')
+ em4Implementation project(':modules:mogo-module-byd-noop')
+ e8xxImplementation project(':modules:mogo-module-byd-noop')
+ e8xxImplementation project(':modules:mogo-module-byd-noop')
+ f8xxImplementation project(':modules:mogo-module-byd-noop')
+ em3Implementation project(':modules:mogo-module-byd-noop')
}
}
diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java
index e9f4369d83..50d5971763 100644
--- a/app/src/main/java/com/mogo/launcher/MogoApplication.java
+++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java
@@ -86,6 +86,7 @@ public class MogoApplication extends AbsMogoApplication {
DebugConfig.setUseCustomNavi(BuildConfig.USE_CUSTOM_NAVI);
DebugConfig.setLauncher(BuildConfig.IS_LAUNCHER);
DebugConfig.setActiveAIAssistFlag( BuildConfig.AI_ASSIST_ACTIVE_STAUTS );
+ DebugConfig.setCarMachineType(BuildConfig.CAR_MACHINE_TYPE);
}
@Override
diff --git a/config.gradle b/config.gradle
index 1250604744..a1a859ba51 100644
--- a/config.gradle
+++ b/config.gradle
@@ -169,6 +169,10 @@ ext {
// 左侧面板
moduleleftpanel : "com.mogo.module:module-left-panel:${MOGO_MODULE_LEFT_PANEL_VERSION}",
// 左侧面板空实现
- moduleleftpanelnoop : "com.mogo.module:module-left-panel-noop:${MOGO_MODULE_LEFT_PANEL_VERSION}"
+ moduleleftpanelnoop : "com.mogo.module:module-left-panel-noop:${MOGO_MODULE_LEFT_PANEL_VERSION}",
+ // 比亚迪
+ modulebyd : "com.mogo.module:module-byd:${MOGO_MODULE_BYD_VERSION}",
+ // 比亚迪空实现
+ modulebydnoop : "com.mogo.module:module-byd-noop:${MOGO_MODULE_BYD_NOOP_VERSION}"
]
}
\ No newline at end of file
diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java
index cd63be6788..02050a9be2 100644
--- a/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java
+++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java
@@ -55,6 +55,11 @@ public class DebugConfig {
private static int sNetMode = NET_MODE_RELEASE;
+ /**
+ * 不使用语音助手
+ */
+ public static final int AI_TYPE_NOOP = 0;
+
/**
* 语音使用同行者
*/
@@ -66,6 +71,17 @@ public class DebugConfig {
private static int sAIType = AI_TYPE_TXZ;
+ /**
+ * 自研车机
+ */
+ public static final int CAR_MACHINE_TYPE_SELF_INNOVATE = 0;
+
+ /**
+ * 比亚迪的车机
+ */
+ public static final int CAR_MACHINE_TYPE_BYD = 1;
+
+ private static int sCarMachineType = CAR_MACHINE_TYPE_SELF_INNOVATE;
/**
* 获取网络环境类型
*
@@ -118,7 +134,7 @@ public class DebugConfig {
/**
* 设置使用哪个语音助手
*
- * @param aiType {@link #AI_TYPE_TXZ} {@link #AI_TYPE_SPEECH}
+ * @param aiType {@link #AI_TYPE_NOOP} {@link #AI_TYPE_TXZ} {@link #AI_TYPE_SPEECH}
*/
public static void setAIType( int aiType ) {
Logger.d( "DebugConfig", "setAiType: " + aiType );
@@ -126,12 +142,28 @@ public class DebugConfig {
}
/**
- * 使用哪个语音助手 {@link #AI_TYPE_TXZ} {@link #AI_TYPE_SPEECH}
+ * 使用哪个语音助手 {@link #AI_TYPE_NOOP} {@link #AI_TYPE_TXZ} {@link #AI_TYPE_SPEECH}
*/
public static int getAIType() {
return sAIType;
}
+ /**
+ * 设置当前车机类型
+ * @param type {@link #CAR_MACHINE_TYPE_SELF_INNOVATE} {@link #CAR_MACHINE_TYPE_BYD}
+ */
+ public static void setCarMachineType(int type) {
+ sCarMachineType = type;
+ }
+
+ /**
+ * 获取当前车机类型
+ * @return {@link #CAR_MACHINE_TYPE_SELF_INNOVATE} {@link #CAR_MACHINE_TYPE_BYD}
+ */
+ public static int getCarMachineType(){
+ return sCarMachineType;
+ }
+
/**
* 是否作为launcher运行
*/
diff --git a/modules/mogo-module-byd-noop/.gitignore b/modules/mogo-module-byd-noop/.gitignore
new file mode 100644
index 0000000000..42afabfd2a
--- /dev/null
+++ b/modules/mogo-module-byd-noop/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/modules/mogo-module-byd-noop/build.gradle b/modules/mogo-module-byd-noop/build.gradle
new file mode 100644
index 0000000000..b8428afdfb
--- /dev/null
+++ b/modules/mogo-module-byd-noop/build.gradle
@@ -0,0 +1,58 @@
+apply plugin: 'com.android.library'
+apply plugin: 'kotlin-kapt'
+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")
+
+ javaCompileOptions {
+ annotationProcessorOptions {
+ arguments = [AROUTER_MODULE_NAME: project.getName()]
+ }
+ }
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ consumerProguardFiles 'consumer-rules.pro'
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+
+ compileOptions {
+ targetCompatibility 1.8
+ sourceCompatibility 1.8
+ }
+
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation rootProject.ext.dependencies.androidxccorektx
+ implementation rootProject.ext.dependencies.kotlinstdlibjdk7
+ implementation rootProject.ext.dependencies.androidxappcompat
+ implementation rootProject.ext.dependencies.androidxconstraintlayout
+ implementation rootProject.ext.dependencies.arouter
+ kapt rootProject.ext.dependencies.aroutercompiler
+ implementation rootProject.ext.dependencies.rxjava
+ implementation rootProject.ext.dependencies.rxandroid
+
+ if (Boolean.valueOf(RELEASE)) {
+ compileOnly rootProject.ext.dependencies.modulecommon
+ } else {
+ compileOnly project(':modules:mogo-module-common')
+ }
+}
+
+apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
diff --git a/modules/mogo-module-byd-noop/consumer-rules.pro b/modules/mogo-module-byd-noop/consumer-rules.pro
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/modules/mogo-module-byd-noop/gradle.properties b/modules/mogo-module-byd-noop/gradle.properties
new file mode 100644
index 0000000000..7b70506f76
--- /dev/null
+++ b/modules/mogo-module-byd-noop/gradle.properties
@@ -0,0 +1,3 @@
+GROUP=com.mogo.module
+POM_ARTIFACT_ID=module-byd-noop
+VERSION_CODE=1
diff --git a/modules/mogo-module-byd-noop/proguard-rules.pro b/modules/mogo-module-byd-noop/proguard-rules.pro
new file mode 100644
index 0000000000..481bb43481
--- /dev/null
+++ b/modules/mogo-module-byd-noop/proguard-rules.pro
@@ -0,0 +1,21 @@
+# 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
\ No newline at end of file
diff --git a/modules/mogo-module-byd-noop/src/androidTest/java/com/zhidao/mogo/module/byd/ExampleInstrumentedTest.kt b/modules/mogo-module-byd-noop/src/androidTest/java/com/zhidao/mogo/module/byd/ExampleInstrumentedTest.kt
new file mode 100644
index 0000000000..01c06de1ae
--- /dev/null
+++ b/modules/mogo-module-byd-noop/src/androidTest/java/com/zhidao/mogo/module/byd/ExampleInstrumentedTest.kt
@@ -0,0 +1,24 @@
+package com.zhidao.mogo.module.byd
+
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.ext.junit.runners.AndroidJUnit4
+
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import org.junit.Assert.*
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+@RunWith(AndroidJUnit4::class)
+class ExampleInstrumentedTest {
+ @Test
+ fun useAppContext() {
+ // Context of the app under test.
+ val appContext = InstrumentationRegistry.getInstrumentation().targetContext
+ assertEquals("com.zhidao.mogo.module.byd.test", appContext.packageName)
+ }
+}
\ No newline at end of file
diff --git a/modules/mogo-module-byd-noop/src/main/AndroidManifest.xml b/modules/mogo-module-byd-noop/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000..42444963be
--- /dev/null
+++ b/modules/mogo-module-byd-noop/src/main/AndroidManifest.xml
@@ -0,0 +1,5 @@
+
+
+ /
+
\ No newline at end of file
diff --git a/modules/mogo-module-byd-noop/src/main/java/com/zhidao/mogo/module/byd/BydConst.kt b/modules/mogo-module-byd-noop/src/main/java/com/zhidao/mogo/module/byd/BydConst.kt
new file mode 100644
index 0000000000..e3c29c6fa0
--- /dev/null
+++ b/modules/mogo-module-byd-noop/src/main/java/com/zhidao/mogo/module/byd/BydConst.kt
@@ -0,0 +1,6 @@
+package com.zhidao.mogo.module.byd
+
+object BydConst {
+ const val MODULE_NAME = "MODULE_BYD"
+ const val PATH_NAME = "/carmachine/byd"
+}
\ No newline at end of file
diff --git a/modules/mogo-module-byd-noop/src/main/java/com/zhidao/mogo/module/byd/BydProvider.kt b/modules/mogo-module-byd-noop/src/main/java/com/zhidao/mogo/module/byd/BydProvider.kt
new file mode 100644
index 0000000000..d0eeddc62f
--- /dev/null
+++ b/modules/mogo-module-byd-noop/src/main/java/com/zhidao/mogo/module/byd/BydProvider.kt
@@ -0,0 +1,72 @@
+package com.zhidao.mogo.module.byd
+
+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.service.module.IMogoModuleLifecycle
+import com.mogo.service.module.IMogoModuleProvider
+import com.mogo.utils.logger.Logger
+import com.zhidao.mogo.module.byd.BydConst.MODULE_NAME
+import com.zhidao.mogo.module.byd.BydConst.PATH_NAME
+
+/**
+ * 比亚迪车机provider
+ *
+ * @author tongchenfei
+ */
+@Route(path = PATH_NAME)
+class BydProvider:IMogoModuleProvider {
+ override fun getNaviListener(): IMogoNaviListener? {
+ return null
+ }
+
+ override fun getLocationListener(): IMogoLocationListener? {
+ return null
+ }
+
+ override fun getType(): Int {
+ return 0
+ }
+
+ override fun getMarkerClickListener(): IMogoMarkerClickListener? {
+ return null
+ }
+
+ override fun init(context: Context?) {
+ Logger.d(MODULE_NAME, "比亚迪noop模块初始化===")
+ }
+
+ override fun getMapListener(): IMogoMapListener? {
+ return null
+ }
+
+ override fun getAppPackage(): String {
+ return ""
+ }
+
+ override fun createView(context: Context?): View? {
+ return null
+ }
+
+ override fun createFragment(context: Context?, data: Bundle?): Fragment? {
+ return null
+ }
+
+ override fun getModuleName(): String {
+ return MODULE_NAME
+ }
+
+ override fun getAppName(): String {
+ return ""
+ }
+
+ override fun getCardLifecycle(): IMogoModuleLifecycle? {
+ return null
+ }
+}
\ No newline at end of file
diff --git a/modules/mogo-module-byd-noop/src/test/java/com/zhidao/mogo/module/byd/ExampleUnitTest.kt b/modules/mogo-module-byd-noop/src/test/java/com/zhidao/mogo/module/byd/ExampleUnitTest.kt
new file mode 100644
index 0000000000..66e978041b
--- /dev/null
+++ b/modules/mogo-module-byd-noop/src/test/java/com/zhidao/mogo/module/byd/ExampleUnitTest.kt
@@ -0,0 +1,17 @@
+package com.zhidao.mogo.module.byd
+
+import org.junit.Test
+
+import org.junit.Assert.*
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+class ExampleUnitTest {
+ @Test
+ fun addition_isCorrect() {
+ assertEquals(4, 2 + 2)
+ }
+}
\ No newline at end of file
diff --git a/modules/mogo-module-byd/.gitignore b/modules/mogo-module-byd/.gitignore
new file mode 100644
index 0000000000..42afabfd2a
--- /dev/null
+++ b/modules/mogo-module-byd/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/modules/mogo-module-byd/build.gradle b/modules/mogo-module-byd/build.gradle
new file mode 100644
index 0000000000..b8428afdfb
--- /dev/null
+++ b/modules/mogo-module-byd/build.gradle
@@ -0,0 +1,58 @@
+apply plugin: 'com.android.library'
+apply plugin: 'kotlin-kapt'
+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")
+
+ javaCompileOptions {
+ annotationProcessorOptions {
+ arguments = [AROUTER_MODULE_NAME: project.getName()]
+ }
+ }
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ consumerProguardFiles 'consumer-rules.pro'
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+
+ compileOptions {
+ targetCompatibility 1.8
+ sourceCompatibility 1.8
+ }
+
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation rootProject.ext.dependencies.androidxccorektx
+ implementation rootProject.ext.dependencies.kotlinstdlibjdk7
+ implementation rootProject.ext.dependencies.androidxappcompat
+ implementation rootProject.ext.dependencies.androidxconstraintlayout
+ implementation rootProject.ext.dependencies.arouter
+ kapt rootProject.ext.dependencies.aroutercompiler
+ implementation rootProject.ext.dependencies.rxjava
+ implementation rootProject.ext.dependencies.rxandroid
+
+ if (Boolean.valueOf(RELEASE)) {
+ compileOnly rootProject.ext.dependencies.modulecommon
+ } else {
+ compileOnly project(':modules:mogo-module-common')
+ }
+}
+
+apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
diff --git a/modules/mogo-module-byd/consumer-rules.pro b/modules/mogo-module-byd/consumer-rules.pro
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/modules/mogo-module-byd/gradle.properties b/modules/mogo-module-byd/gradle.properties
new file mode 100644
index 0000000000..a829812ae7
--- /dev/null
+++ b/modules/mogo-module-byd/gradle.properties
@@ -0,0 +1,3 @@
+GROUP=com.mogo.module
+POM_ARTIFACT_ID=module-byd
+VERSION_CODE=1
diff --git a/modules/mogo-module-byd/proguard-rules.pro b/modules/mogo-module-byd/proguard-rules.pro
new file mode 100644
index 0000000000..481bb43481
--- /dev/null
+++ b/modules/mogo-module-byd/proguard-rules.pro
@@ -0,0 +1,21 @@
+# 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
\ No newline at end of file
diff --git a/modules/mogo-module-byd/src/androidTest/java/com/zhidao/mogo/module/byd/ExampleInstrumentedTest.kt b/modules/mogo-module-byd/src/androidTest/java/com/zhidao/mogo/module/byd/ExampleInstrumentedTest.kt
new file mode 100644
index 0000000000..01c06de1ae
--- /dev/null
+++ b/modules/mogo-module-byd/src/androidTest/java/com/zhidao/mogo/module/byd/ExampleInstrumentedTest.kt
@@ -0,0 +1,24 @@
+package com.zhidao.mogo.module.byd
+
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.ext.junit.runners.AndroidJUnit4
+
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import org.junit.Assert.*
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+@RunWith(AndroidJUnit4::class)
+class ExampleInstrumentedTest {
+ @Test
+ fun useAppContext() {
+ // Context of the app under test.
+ val appContext = InstrumentationRegistry.getInstrumentation().targetContext
+ assertEquals("com.zhidao.mogo.module.byd.test", appContext.packageName)
+ }
+}
\ No newline at end of file
diff --git a/modules/mogo-module-byd/src/main/AndroidManifest.xml b/modules/mogo-module-byd/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000..42444963be
--- /dev/null
+++ b/modules/mogo-module-byd/src/main/AndroidManifest.xml
@@ -0,0 +1,5 @@
+
+
+ /
+
\ No newline at end of file
diff --git a/modules/mogo-module-byd/src/main/java/com/zhidao/mogo/module/byd/BydConst.kt b/modules/mogo-module-byd/src/main/java/com/zhidao/mogo/module/byd/BydConst.kt
new file mode 100644
index 0000000000..e3c29c6fa0
--- /dev/null
+++ b/modules/mogo-module-byd/src/main/java/com/zhidao/mogo/module/byd/BydConst.kt
@@ -0,0 +1,6 @@
+package com.zhidao.mogo.module.byd
+
+object BydConst {
+ const val MODULE_NAME = "MODULE_BYD"
+ const val PATH_NAME = "/carmachine/byd"
+}
\ No newline at end of file
diff --git a/modules/mogo-module-byd/src/main/java/com/zhidao/mogo/module/byd/BydProvider.kt b/modules/mogo-module-byd/src/main/java/com/zhidao/mogo/module/byd/BydProvider.kt
new file mode 100644
index 0000000000..0d5ac659e1
--- /dev/null
+++ b/modules/mogo-module-byd/src/main/java/com/zhidao/mogo/module/byd/BydProvider.kt
@@ -0,0 +1,73 @@
+package com.zhidao.mogo.module.byd
+
+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.service.module.IMogoModuleLifecycle
+import com.mogo.service.module.IMogoModuleProvider
+import com.mogo.utils.logger.Logger
+import com.zhidao.mogo.module.byd.BydConst.MODULE_NAME
+import com.zhidao.mogo.module.byd.BydConst.PATH_NAME
+import com.zhidao.mogo.module.byd.fragment.BydSplashFragment
+
+/**
+ * 比亚迪车机provider
+ *
+ * @author tongchenfei
+ */
+@Route(path = PATH_NAME)
+class BydProvider:IMogoModuleProvider {
+ override fun getNaviListener(): IMogoNaviListener? {
+ return null
+ }
+
+ override fun getLocationListener(): IMogoLocationListener? {
+ return null
+ }
+
+ override fun getType(): Int {
+ return 0
+ }
+
+ override fun getMarkerClickListener(): IMogoMarkerClickListener? {
+ return null
+ }
+
+ override fun init(context: Context?) {
+ Logger.d(MODULE_NAME, "比亚迪模块初始化===")
+ }
+
+ override fun getMapListener(): IMogoMapListener? {
+ return null
+ }
+
+ override fun getAppPackage(): String {
+ return ""
+ }
+
+ override fun createView(context: Context?): View? {
+ return null
+ }
+
+ override fun createFragment(context: Context?, data: Bundle?): Fragment? {
+ return BydSplashFragment()
+ }
+
+ override fun getModuleName(): String {
+ return MODULE_NAME
+ }
+
+ override fun getAppName(): String {
+ return ""
+ }
+
+ override fun getCardLifecycle(): IMogoModuleLifecycle? {
+ return null
+ }
+}
\ No newline at end of file
diff --git a/modules/mogo-module-byd/src/main/java/com/zhidao/mogo/module/byd/fragment/BydSplashFragment.kt b/modules/mogo-module-byd/src/main/java/com/zhidao/mogo/module/byd/fragment/BydSplashFragment.kt
new file mode 100644
index 0000000000..3f9ebc4fb4
--- /dev/null
+++ b/modules/mogo-module-byd/src/main/java/com/zhidao/mogo/module/byd/fragment/BydSplashFragment.kt
@@ -0,0 +1,19 @@
+package com.zhidao.mogo.module.byd.fragment
+
+import com.mogo.commons.mvp.MvpFragment
+import com.zhidao.mogo.module.byd.R
+import com.zhidao.mogo.module.byd.presenter.BydSplashPresenter
+import kotlinx.android.synthetic.main.fragment_byd_splash.*
+
+class BydSplashFragment :MvpFragment(){
+ override fun getLayoutId(): Int = R.layout.fragment_byd_splash
+
+ override fun initViews() {
+ tvByd.setOnClickListener {
+ activity!!.supportFragmentManager.beginTransaction().remove(this).commit()
+ }
+ }
+
+ override fun createPresenter(): BydSplashPresenter = BydSplashPresenter(this)
+
+}
\ No newline at end of file
diff --git a/modules/mogo-module-byd/src/main/java/com/zhidao/mogo/module/byd/presenter/BydSplashPresenter.kt b/modules/mogo-module-byd/src/main/java/com/zhidao/mogo/module/byd/presenter/BydSplashPresenter.kt
new file mode 100644
index 0000000000..0941fb190d
--- /dev/null
+++ b/modules/mogo-module-byd/src/main/java/com/zhidao/mogo/module/byd/presenter/BydSplashPresenter.kt
@@ -0,0 +1,7 @@
+package com.zhidao.mogo.module.byd.presenter
+
+import com.mogo.commons.mvp.Presenter
+import com.zhidao.mogo.module.byd.fragment.BydSplashFragment
+
+class BydSplashPresenter(view: BydSplashFragment) : Presenter(view) {
+}
\ No newline at end of file
diff --git a/modules/mogo-module-byd/src/main/res/drawable-xhdpi/binli.jpg b/modules/mogo-module-byd/src/main/res/drawable-xhdpi/binli.jpg
new file mode 100644
index 0000000000..172a7f7486
Binary files /dev/null and b/modules/mogo-module-byd/src/main/res/drawable-xhdpi/binli.jpg differ
diff --git a/modules/mogo-module-byd/src/main/res/layout/fragment_byd_splash.xml b/modules/mogo-module-byd/src/main/res/layout/fragment_byd_splash.xml
new file mode 100644
index 0000000000..48d96894c5
--- /dev/null
+++ b/modules/mogo-module-byd/src/main/res/layout/fragment_byd_splash.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-byd/src/test/java/com/zhidao/mogo/module/byd/ExampleUnitTest.kt b/modules/mogo-module-byd/src/test/java/com/zhidao/mogo/module/byd/ExampleUnitTest.kt
new file mode 100644
index 0000000000..66e978041b
--- /dev/null
+++ b/modules/mogo-module-byd/src/test/java/com/zhidao/mogo/module/byd/ExampleUnitTest.kt
@@ -0,0 +1,17 @@
+package com.zhidao.mogo.module.byd
+
+import org.junit.Test
+
+import org.junit.Assert.*
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+class ExampleUnitTest {
+ @Test
+ fun addition_isCorrect() {
+ assertEquals(4, 2 + 2)
+ }
+}
\ No newline at end of file
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 b42f31f3c3..735adba0dd 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
@@ -124,6 +124,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
final long start = System.currentTimeMillis();
MogoModulesManager.getInstance().init( this, getApis() );
+ loadSplash();
mMogoMapService = mServiceApis.getMapServiceApi();
if ( mMogoMapService != null ) {
mMogoMapService.getHostListenerRegister().registerHostMapListener( EventDispatchCenter.getInstance() );
@@ -204,6 +205,11 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
// mCardsContainer.setAdapter( mCardModulesAdapter );
}
+ @Override
+ public void loadSplash() {
+ MogoModulesManager.getInstance().loadBydModule(R.id.module_main_id_splash_container);
+ }
+
@NonNull
@Override
protected MainPresenter createPresenter() {
diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainView.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainView.java
index e2b33db244..bdbacc1766 100644
--- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainView.java
+++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainView.java
@@ -32,4 +32,9 @@ public interface MainView extends IView {
* @return
*/
IMogoServiceApis getApis();
+
+ /**
+ * 加载闪屏页
+ */
+ void loadSplash();
}
diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesHandler.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesHandler.java
index c594af9c33..f926ded326 100644
--- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesHandler.java
+++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesHandler.java
@@ -71,4 +71,10 @@ public interface MogoModulesHandler {
* @param containerId
*/
void loadLeftPanelModule(int containerId);
+
+ /**
+ * 加载比亚迪模块
+ * @param containerId
+ */
+ void loadBydModule(int containerId);
}
diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesManager.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesManager.java
index 7bc36e79b4..4d15784d5c 100644
--- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesManager.java
+++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesManager.java
@@ -147,6 +147,14 @@ public class MogoModulesManager implements MogoModulesHandler {
addFragment( provider, containerId );
}
+ @Override
+ public void loadBydModule(int containerId) {
+ IMogoModuleProvider provider = ( IMogoModuleProvider ) ARouter.getInstance()
+ .build(MogoServicePaths.PATH_BYD)
+ .navigation( getContext() );
+ addFragment( provider, containerId );
+ }
+
@Override
public void loadBaseModule() {
List< MogoModule > baseModules = MogoModulePaths.getBaseModules();
diff --git a/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml b/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml
index a3be7e8723..bcb2744c24 100644
--- a/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml
+++ b/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml
@@ -9,23 +9,23 @@
+ android:layout_height="match_parent" />
-
-
-
-
-
-
+
+
+
+
+
+
+ android:layout_height="match_parent" />
+ android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"
+ android:padding="@dimen/module_main_entrance_fragment_container_padding" />
+
+ android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"
+ android:padding="@dimen/module_main_entrance_fragment_container_padding" />
+
+
\ No newline at end of file
diff --git a/services/mogo-service-api/src/main/java/com/mogo/service/MogoServicePaths.java b/services/mogo-service-api/src/main/java/com/mogo/service/MogoServicePaths.java
index a82b73509a..b170a01a6b 100644
--- a/services/mogo-service-api/src/main/java/com/mogo/service/MogoServicePaths.java
+++ b/services/mogo-service-api/src/main/java/com/mogo/service/MogoServicePaths.java
@@ -202,4 +202,10 @@ public class MogoServicePaths {
*/
@Deprecated
public static final String PATH_LEFT_PANEL = "/left/panel";
+
+ /**
+ * 比亚迪模块
+ */
+ @Deprecated
+ public static final String PATH_BYD = "/carmachine/byd";
}
diff --git a/settings.gradle b/settings.gradle
index 1fb97335db..2ba4d0dab3 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,3 +1,5 @@
+include ':modules:mogo-module-byd-noop'
+include ':modules:mogo-module-byd'
include ':modules:mogo-module-left-panel-noop'
include ':modules:mogo-module-left-panel'
include ':modules:mogo-module-event-panel-noop'
diff --git a/upload.sh b/upload.sh
index 1926131d33..cb03475f02 100755
--- a/upload.sh
+++ b/upload.sh
@@ -31,4 +31,6 @@
./gradlew :modules:mogo-module-event-panel-noop:clean :modules:mogo-module-event-panel-noop:uploadArchives
./gradlew :modules:mogo-module-left-panel:clean :modules:mogo-module-left-panel:uploadArchives
./gradlew :modules:mogo-module-left-panel-noop:clean :modules:mogo-module-left-panel-noop:uploadArchives
+./gradlew :modules:mogo-module-byd:clean :modules:mogo-module-byd:uploadArchives
+./gradlew :modules:mogo-module-byd-noop:clean :modules:mogo-module-byd-noop:uploadArchives