This commit is contained in:
unknown
2020-07-16 14:41:45 +08:00
50 changed files with 665 additions and 61 deletions

2
.idea/gradle.xml generated
View File

@@ -44,6 +44,8 @@
<option value="$PROJECT_DIR$/modules/mogo-module-search" />
<option value="$PROJECT_DIR$/modules/mogo-module-service" />
<option value="$PROJECT_DIR$/modules/mogo-module-share" />
<option value="$PROJECT_DIR$/modules/mogo-module-splash" />
<option value="$PROJECT_DIR$/modules/mogo-module-splash-noop" />
<option value="$PROJECT_DIR$/services" />
<option value="$PROJECT_DIR$/services/mogo-service" />
<option value="$PROJECT_DIR$/services/mogo-service-api" />

View File

@@ -104,6 +104,8 @@ android {
// 使用思必驰语音
buildConfigField 'int', 'AIType','2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
}
// e系列采用Launcher方案
e8xx {
@@ -111,6 +113,8 @@ android {
// 使用思必驰语音
buildConfigField 'int', 'AIType','2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
}
// 同上
em4 {
@@ -118,6 +122,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 {
@@ -125,6 +131,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 {
@@ -132,6 +140,8 @@ android {
// 使用思必驰语音
buildConfigField 'int', 'AIType', '2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
}
// d系列
d8xx {
@@ -139,6 +149,8 @@ android {
// 使用同行者语音
buildConfigField 'int', 'AIType','1'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
}
// d系列 1+16 版本
d82x{
@@ -146,6 +158,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"
@@ -244,9 +267,11 @@ dependencies {
releaseImplementation rootProject.ext.dependencies.gpssimulatornoop
implementation rootProject.ext.dependencies.modulemedia
implementation rootProject.ext.dependencies.moduleservice
implementation rootProject.ext.dependencies.modulesplash
// 事件面板分渠道引用
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
@@ -255,6 +280,7 @@ 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
@@ -274,9 +300,11 @@ dependencies {
releaseImplementation project(':modules:mogo-module-gps-simulator-noop')
implementation project(':modules:mogo-module-media')
implementation project(':modules:mogo-module-service')
// implementation project(':modules:mogo-module-splash')
// 事件面板分渠道引用
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')
@@ -285,6 +313,7 @@ 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')

View File

@@ -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

View File

@@ -123,7 +123,7 @@ ext {
mogomoduleauth : "com.mogo.module:module-authorize:${MOGO_MODULE_AUTHORIZE_VERSION}",
mogomoduleguide : "com.mogo.module:module-guide:${MOGO_MODULE_GUIDE_VERSION}",
// 长链
socketsdk : 'com.zhidao.socketsdk:socketsdk:2.1.2',
socketsdk : 'com.zhidao.socketsdk:socketsdk:2.1.1',
socketsdkconnsvrprotoco : 'com.zhidao.ptech:connsvr-protoco:0.1.23',
socketsdkprotobufjava : 'com.google.protobuf:protobuf-java:3.5.1',
// OBU
@@ -169,6 +169,8 @@ 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}",
// 闪屏页
modulesplash : "com.mogo.module:module-splash:${MOGO_MODULE_SPLASH_VERSION}",
]
}

View File

@@ -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运行
*/

View File

@@ -4,9 +4,14 @@ import android.content.Context;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.Window;
import android.view.WindowManager;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.utils.SoftKeyBoardJobber;
/**
@@ -23,6 +28,10 @@ public abstract class MvpActivity< V extends IView, P extends Presenter< V > >
@Override
protected void onCreate( @Nullable Bundle savedInstanceState ) {
super.onCreate( savedInstanceState );
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_BYD) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
setContentView( getLayoutId() );
initViews();
mPresenter = createPresenter();

View File

@@ -27,40 +27,37 @@ PASSWORD=xintai2018
RELEASE=false
# 模块版本
## 工程内模块
MOGO_COMMONS_VERSION=1.2.1.13
MOGO_UTILS_VERSION=1.2.1.13
MAP_AMAP_VERSION=1.2.1.13
MAP_AUTONAVI_VERSION=1.2.1.13
MOGO_MAP_VERSION=1.2.1.13
MOGO_MAP_API_VERSION=1.2.1.13
MOGO_SERVICE_VERSION=1.2.1.13
MOGO_SERVICE_API_VERSION=1.2.1.13
MOGO_CONNECTION_VERSION=1.2.1.13
MOGO_MODULE_APPS_VERSION=1.2.1.13
MOGO_MODULE_NAVI_VERSION=1.2.1.13
MOGO_MODULE_SHARE_VERSION=1.2.1.13
MOGO_MODULE_COMMON_VERSION=1.2.1.14
MOGO_MODULE_MAIN_VERSION=1.2.1.13
MOGO_MODULE_MAP_VERSION=1.2.1.13
MOGO_MODULE_SERVICE_VERSION=1.2.1.13
MOGO_MODULE_EXTENSIONS_VERSION=1.2.1.13
MOGO_MODULE_SEARCH_VERSION=1.2.1.13
MOGO_MODULE_BACK_VERSION=1.2.1.13
MOGO_MODULE_GPS_SIMULATOR_VERSION=1.2.1.13
MOGO_MODULE_GPS_SIMULATOR_DEBUG_VERSION=1.2.1.13
MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION=1.2.1.13
MOGO_MODULE_AUTHORIZE_VERSION=1.2.1.13
MOGO_MODULE_GUIDE_VERSION=1.2.1.13
MOGO_MODULE_MEDIA_VERSION=1.2.1.13
MOGO_MODULE_MAIN_LAUNCHER_VERSION = 1.2.1.13
MOGO_MODULE_MAIN_INDEPENDENT_VERSION = 1.2.1.13
MOGO_MODULE_OBU_VERSION = 1.2.1.10-SNAPSHOT
MOGO_COMMONS_VERSION=1.2.1.17
MOGO_UTILS_VERSION=1.2.1.17
MAP_AMAP_VERSION=1.2.1.17
MAP_AUTONAVI_VERSION=1.2.1.17
MOGO_MAP_VERSION=1.2.1.17
MOGO_MAP_API_VERSION=1.2.1.17
MOGO_SERVICE_VERSION=1.2.1.17
MOGO_SERVICE_API_VERSION=1.2.1.17
MOGO_CONNECTION_VERSION=1.2.1.17
MOGO_MODULE_APPS_VERSION=1.2.1.17
MOGO_MODULE_NAVI_VERSION=1.2.1.17
MOGO_MODULE_SHARE_VERSION=1.2.1.17
MOGO_MODULE_COMMON_VERSION=1.2.1.17
MOGO_MODULE_MAIN_VERSION=1.2.1.17
MOGO_MODULE_MAP_VERSION=1.2.1.17
MOGO_MODULE_SERVICE_VERSION=1.2.1.17
MOGO_MODULE_EXTENSIONS_VERSION=1.2.1.17
MOGO_MODULE_SEARCH_VERSION=1.2.1.17
MOGO_MODULE_BACK_VERSION=1.2.1.17
MOGO_MODULE_GPS_SIMULATOR_VERSION=1.2.1.17
MOGO_MODULE_GPS_SIMULATOR_DEBUG_VERSION=1.2.1.17
MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION=1.2.1.17
MOGO_MODULE_AUTHORIZE_VERSION=1.2.1.17
MOGO_MODULE_GUIDE_VERSION=1.2.1.17
MOGO_MODULE_MEDIA_VERSION=1.2.1.17
MOGO_MODULE_MAIN_LAUNCHER_VERSION = 1.2.1.17
MOGO_MODULE_MAIN_INDEPENDENT_VERSION = 1.2.1.17
## 工程外部模块
# 探路
MOGO_MODULE_TANLU_VERSION=1.3.0.1-SNAPSHOT
MOGO_MODULE_TANLU_VERSION=1.3.0.2
# 车聊聊
CARCHATTING_VERSION=1.3.2
# 车聊聊接口
@@ -72,15 +69,15 @@ MOGO_MODULE_GUIDESHOW_PROVIDER_VERSION=1.0.2-SNAPSHOT
# 在线车辆F
MOGO_MODULE_ONLINECAR_VERSION=1.0.3.2
# v2x
MOGO_MODULE_V2X_VERSION=1.2.7
MOGO_MODULE_V2X_VERSION=1.2.8
# 推送
MOGO_MODULE_PUSH_VERSION=1.1.5.5
MOGO_MODULE_PUSH_VERSION=1.1.5.6
MOGO_MODULE_PUSH_BASE_VERSION=1.1.5.5
MOGO_MODULE_PUSH_NOOP_VERSION=1.1.5.5
# 广告资源位
MOGO_MODULE_AD_CARD_VERSION=1.0.1
# 探路上报和分享模块
TANLULIB_VERSION=1.3.0.1-SNAPSHOT
TANLULIB_VERSION=1.3.0.2
MOGO_MODULE_EVENT_PANEL_VERSION = 1.0.0-SNAPSHOT
MOGO_MODULE_EVENT_PANEL_NOOP_VERSION = 1.0.0-SNAPSHOT
#左侧面板模块
@@ -92,6 +89,13 @@ BOOST_MULTIDEX_VERSION=1.0.0
# hook ARouter分包实现
HOOKPLUGIN_VERSION=1.0.0
# obu
MOGO_MODULE_OBU_VERSION = 1.2.1.10-SNAPSHOT
# 闪屏页
MOGO_MODULE_SPLASH_VERSION = 1.0.0-SNAPSHOT
MOGO_MODULE_SPLASH_NOOP_VERSION = 1.0.0-SNAPSHOT
## 产品库必备配置
applicationId=com.mogo.launcer
applicationName=IntelligentPilot

View File

@@ -6,7 +6,11 @@ import android.widget.FrameLayout;
import androidx.annotation.Nullable;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.module.main.MainActivity;
import com.mogo.service.IMogoServiceApis;
import com.mogo.service.MogoServicePaths;
/**
* 针对独立应用形式,做单独定制
@@ -19,6 +23,12 @@ public class MainIndependentActivity extends MainActivity {
super.onCreate( savedInstanceState );
// 独立app需要在onCreate里面增加处理scheme的情况
mPresenter.handleSchemeIntent( getIntent() );
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_BYD) {
IMogoServiceApis apis =
(IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(this);
apis.getShareManager().resetContext(this);
}
}
@Override

View File

@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.alibaba.arouter'
apply plugin: 'android-aspectjx'

View File

@@ -1,6 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.alibaba.arouter'
android {

View File

@@ -20,7 +20,7 @@ public class BaseFloatDialog extends Dialog {
public BaseFloatDialog(@NonNull Context context, int themeResId) {
super(context, themeResId);
addFlag();
// addFlag();
}
private void addFlag() {

View File

@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.alibaba.arouter'
android {

View File

@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.alibaba.arouter'
android {

View File

@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.alibaba.arouter'
android {

View File

@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.alibaba.arouter'
android {

View File

@@ -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().loadSplashModule(R.id.module_main_id_splash_container);
}
@NonNull
@Override
protected MainPresenter createPresenter() {

View File

@@ -32,4 +32,9 @@ public interface MainView extends IView {
* @return
*/
IMogoServiceApis getApis();
/**
* 加载闪屏页
*/
void loadSplash();
}

View File

@@ -71,4 +71,10 @@ public interface MogoModulesHandler {
* @param containerId
*/
void loadLeftPanelModule(int containerId);
/**
* 加载比亚迪模块
* @param containerId
*/
void loadSplashModule(int containerId);
}

View File

@@ -8,7 +8,6 @@ import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.module.common.MogoModule;
import com.mogo.module.common.MogoModulePaths;
import com.mogo.module.extensions.ExtensionsModuleConst;
import com.mogo.module.main.EventDispatchCenter;
import com.mogo.module.main.MainActivity;
import com.mogo.service.IMogoServiceApis;
import com.mogo.service.MogoServicePaths;
@@ -147,6 +146,14 @@ public class MogoModulesManager implements MogoModulesHandler {
addFragment( provider, containerId );
}
@Override
public void loadSplashModule(int containerId) {
IMogoModuleProvider provider = ( IMogoModuleProvider ) ARouter.getInstance()
.build(MogoServicePaths.PATH_SPLASH)
.navigation( getContext() );
addFragment( provider, containerId );
}
@Override
public void loadBaseModule() {
List< MogoModule > baseModules = MogoModulePaths.getBaseModules();

View File

@@ -9,23 +9,23 @@
<FrameLayout
android:id="@+id/module_main_id_map_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/module_main_id_map_left_shadow_frame"
android:layout_width="@dimen/module_main_map_left_shadow_frame_width"
android:layout_height="match_parent"
android:visibility="gone"
android:background="@drawable/module_main_dw_left_frame_bkg"
android:visibility="gone"
tools:visibility="visible" />
<!-- 时间、天气、消息 与entrance合到了一起减少一个view -->
<!-- <FrameLayout-->
<!-- android:id="@+id/module_main_id_header_fragment_container"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="@dimen/module_ext_height"-->
<!-- android:layout_marginLeft="@dimen/module_main_header_fragment_container_marginLeft"-->
<!-- android:layout_marginTop="@dimen/module_main_header_fragment_container_marginTop" />-->
<!-- <FrameLayout-->
<!-- android:id="@+id/module_main_id_header_fragment_container"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="@dimen/module_ext_height"-->
<!-- android:layout_marginLeft="@dimen/module_main_header_fragment_container_marginLeft"-->
<!-- android:layout_marginTop="@dimen/module_main_header_fragment_container_marginTop" />-->
<!-- 左边按钮 -->
<FrameLayout
@@ -36,23 +36,24 @@
<!-- 左侧浮层,布局位置目前只考虑了1+16独立app情况 -->
<FrameLayout
android:id="@+id/module_main_id_left_panel_fragment_container"
android:layout_width="@dimen/module_main_id_left_panel_fragment_container_width"
android:layout_height="match_parent"
android:id="@+id/module_main_id_left_panel_fragment_container" />
android:layout_height="match_parent" />
<!--快捷操作浮层-->
<FrameLayout
android:id="@+id/module_main_id_entrance_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/module_main_entrance_fragment_container_padding"
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft" />
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"
android:padding="@dimen/module_main_entrance_fragment_container_padding" />
<FrameLayout
android:id="@+id/module_main_id_event_panel_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/module_main_entrance_fragment_container_padding"
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft" />
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"
android:padding="@dimen/module_main_entrance_fragment_container_padding" />
<!-- 浮层-->
<FrameLayout
@@ -73,5 +74,10 @@
android:visibility="visible"
tools:visibility="gone" />
<FrameLayout
android:id="@+id/module_main_id_splash_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>

View File

@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.alibaba.arouter'
android {

View File

@@ -115,6 +115,11 @@ public class ShareControl implements IMogoShareManager, IMogoIntentListener, IMo
}
}
@Override
public void resetContext(Context context) {
mContext = context;
}
private void realShowDialog() {
if (mShareDialog == null) {
mShareDialog = new LaucherShareDialog(mContext);

View File

@@ -0,0 +1 @@
/build

View File

@@ -0,0 +1,58 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
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()

View File

@@ -0,0 +1,3 @@
GROUP=com.mogo.module
POM_ARTIFACT_ID=module-splash-noop
VERSION_CODE=1

View File

@@ -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

View File

@@ -0,0 +1,24 @@
package com.zhidao.mogo.module.splash
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)
}
}

View File

@@ -0,0 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zhidao.mogo.module.splash">
</manifest>

View File

@@ -0,0 +1,6 @@
package com.zhidao.mogo.module.splash
object BydConst {
const val MODULE_NAME = "MODULE_BYD"
const val PATH_NAME = "/carmachine/byd"
}

View File

@@ -0,0 +1,72 @@
package com.zhidao.mogo.module.splash
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.splash.BydConst.MODULE_NAME
import com.zhidao.mogo.module.splash.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
}
}

View File

@@ -0,0 +1,17 @@
package com.zhidao.mogo.module.splash
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)
}
}

1
modules/mogo-module-splash/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

View File

@@ -0,0 +1,58 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
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()

View File

@@ -0,0 +1,3 @@
GROUP=com.mogo.module
POM_ARTIFACT_ID=module-splash
VERSION_CODE=1

View File

@@ -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

View File

@@ -0,0 +1,24 @@
package com.zhidao.mogo.module.splash
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)
}
}

View File

@@ -0,0 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zhidao.mogo.module.splash">
</manifest>

View File

@@ -0,0 +1,6 @@
package com.zhidao.mogo.module.splash
object BydConst {
const val MODULE_NAME = "MODULE_SPLASH"
const val PATH_NAME = "/splash/api"
}

View File

@@ -0,0 +1,76 @@
package com.zhidao.mogo.module.splash
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.commons.debug.DebugConfig
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.splash.BydConst.MODULE_NAME
import com.zhidao.mogo.module.splash.BydConst.PATH_NAME
import com.zhidao.mogo.module.splash.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? = if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_BYD) {
BydSplashFragment()
} else {
null
}
override fun getModuleName(): String {
return MODULE_NAME
}
override fun getAppName(): String {
return ""
}
override fun getCardLifecycle(): IMogoModuleLifecycle? {
return null
}
}

View File

@@ -0,0 +1,19 @@
package com.zhidao.mogo.module.splash.fragment
import com.mogo.commons.mvp.MvpFragment
import com.zhidao.mogo.module.splash.R
import com.zhidao.mogo.module.splash.presenter.BydSplashPresenter
import kotlinx.android.synthetic.main.fragment_byd_splash.*
class BydSplashFragment :MvpFragment<BydSplashFragment,BydSplashPresenter>(){
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)
}

View File

@@ -0,0 +1,7 @@
package com.zhidao.mogo.module.splash.presenter
import com.mogo.commons.mvp.Presenter
import com.zhidao.mogo.module.splash.fragment.BydSplashFragment
class BydSplashPresenter(view: BydSplashFragment) : Presenter<BydSplashFragment>(view) {
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fff">
<TextView
android:id="@+id/tvByd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#fff"
android:drawableTop="@drawable/binli"
android:drawablePadding="10dp"
android:gravity="center"
android:text="比亚迪"
android:textSize="40sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,17 @@
package com.zhidao.mogo.module.splash
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)
}
}

View File

@@ -202,4 +202,10 @@ public class MogoServicePaths {
*/
@Deprecated
public static final String PATH_LEFT_PANEL = "/left/panel";
/**
* 比亚迪模块
*/
@Deprecated
public static final String PATH_SPLASH = "/splash/api";
}

View File

@@ -1,5 +1,7 @@
package com.mogo.service.share;
import android.content.Context;
import com.mogo.service.module.IMogoModuleProvider;
/**
@@ -16,4 +18,10 @@ public interface IMogoShareManager extends IMogoModuleProvider {
* 隐藏分享框
*/
void dismissShareDialog();
/**
* 重置一下上下文普通dialog需要activity的上下文
* @param context 待重置的上下文
*/
void resetContext(Context context);
}

View File

@@ -1,3 +1,5 @@
include ':modules:mogo-module-splash-noop'
include ':modules:mogo-module-splash'
include ':modules:mogo-module-left-panel-noop'
include ':modules:mogo-module-left-panel'
include ':modules:mogo-module-event-panel-noop'

View File

@@ -31,4 +31,5 @@
./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