[1.0.0]
[m1] [乘客屏单独抽到base 下]
@@ -38,6 +38,19 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "product"
|
||||
productFlavors {
|
||||
base {
|
||||
dimension "product"
|
||||
buildConfigField 'int', 'NEW_TEST', '0'
|
||||
}
|
||||
// 接驳车
|
||||
m1 {
|
||||
dimension "product"
|
||||
buildConfigField 'int', 'NEW_TEST', '1'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -38,7 +38,10 @@ object BusPassengerServiceManager {
|
||||
mBusPassengerServiceApi.queryDriverSiteByCoordinate(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
BusPassengerQueryLineRequest(driverAppSn))
|
||||
BusPassengerQueryLineRequest(
|
||||
driverAppSn
|
||||
)
|
||||
)
|
||||
.transformTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverSiteByCoordinate"))
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.och.bus.passenger.presenter;
|
||||
|
||||
import android.location.Location;
|
||||
import android.os.Looper;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 765 B After Width: | Height: | Size: 765 B |
|
Before Width: | Height: | Size: 797 B After Width: | Height: | Size: 797 B |
|
Before Width: | Height: | Size: 795 B After Width: | Height: | Size: 795 B |
|
Before Width: | Height: | Size: 765 B After Width: | Height: | Size: 765 B |
|
Before Width: | Height: | Size: 879 B After Width: | Height: | Size: 879 B |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 628 B |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 594 B |
@@ -0,0 +1,89 @@
|
||||
package com.mogo.och.bus.passenger
|
||||
|
||||
import android.content.Context
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.commons.module.status.StatusDescriptor
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager.getMapUIController
|
||||
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager.stepInDayMode
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.och.bus.passenger.constant.BusPassengerConst
|
||||
import com.mogo.och.bus.passenger.ui.BusPassengerRouteFragment
|
||||
|
||||
/**
|
||||
* 网约车-Bus-乘客端
|
||||
*
|
||||
* Created on 2022/3/29
|
||||
*/
|
||||
@Route(path = BusPassengerConst.PATH)
|
||||
class MogoOCHBusPassenger : IMogoOCH, IMogoStatusChangedListener {
|
||||
private var mActivity: FragmentActivity? = null
|
||||
private var mContainerId = 0
|
||||
private var mPassengerFragment: BusPassengerRouteFragment? = null
|
||||
override fun createCoverage(activity: FragmentActivity, containerId: Int) {}
|
||||
override fun createCoverage(activity: FragmentActivity?, containerId: Int?): Fragment? {
|
||||
mActivity = activity
|
||||
mContainerId = containerId!!
|
||||
return null
|
||||
}
|
||||
|
||||
override val functionName: String
|
||||
get() = "och-bus-passenger-m1"
|
||||
|
||||
override fun onDestroy() {
|
||||
// 若不调用finish, 设置中打开关闭UITouch,会造成och fragment 重叠
|
||||
mActivity?.finish()
|
||||
}
|
||||
|
||||
override fun init(context: Context) {
|
||||
MogoStatusManager.getInstance()
|
||||
.registerStatusChangedListener("OchBus", StatusDescriptor.VR_MODE, this)
|
||||
}
|
||||
|
||||
override fun onStatusChanged(descriptor: StatusDescriptor, isTrue: Boolean) {
|
||||
if (descriptor == StatusDescriptor.VR_MODE) {
|
||||
if (isTrue) {
|
||||
showFragment()
|
||||
} else {
|
||||
hideFragment()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入鹰眼模式,设置手势缩放地图失效
|
||||
*/
|
||||
private fun stepIntoVrMode() {
|
||||
d(SceneConstant.M_TAXI_P + TAG, "进入vr模式")
|
||||
getMapUIController()?.stepInVrMode(true) // 白天模式
|
||||
stepInDayMode() //白天模式 状态栏字体颜色变黑
|
||||
}
|
||||
|
||||
private fun showFragment() {
|
||||
if (mPassengerFragment == null) {
|
||||
d(SceneConstant.M_TAXI_P + TAG, "准备add fragment======")
|
||||
mPassengerFragment = BusPassengerRouteFragment()
|
||||
mActivity!!.supportFragmentManager.beginTransaction()
|
||||
.add(mContainerId, mPassengerFragment!!).commitAllowingStateLoss()
|
||||
return
|
||||
}
|
||||
d(SceneConstant.M_TAXI_P + TAG, "准备show fragment")
|
||||
mActivity!!.supportFragmentManager.beginTransaction().show(mPassengerFragment!!)
|
||||
.commitAllowingStateLoss()
|
||||
}
|
||||
|
||||
private fun hideFragment() {
|
||||
if (mPassengerFragment != null) {
|
||||
mActivity!!.supportFragmentManager.beginTransaction().hide(mPassengerFragment!!)
|
||||
.commitAllowingStateLoss()
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val TAG = MogoOCHBusPassenger::class.java.simpleName
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.mogo.och.bus.passenger.presenter
|
||||
|
||||
import com.mogo.commons.mvp.Presenter
|
||||
import com.mogo.och.bus.passenger.ui.BusPassengerRouteFragment
|
||||
|
||||
class BusPassengerPresenter(view: BusPassengerRouteFragment?) :
|
||||
Presenter<BusPassengerRouteFragment?>(view)
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.mogo.och.bus.passenger.ui
|
||||
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager.hidePanel
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.presenter.BusPassengerPresenter
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/4/12
|
||||
*/
|
||||
class BusPassengerRouteFragment :
|
||||
MvpFragment<BusPassengerRouteFragment?, BusPassengerPresenter?>() {
|
||||
/**
|
||||
* 改变自动驾驶状态
|
||||
*
|
||||
* @param status 2 - running 1 - enable 2 - disable
|
||||
*/
|
||||
private val mPrevAPStatus = -1
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.bus_p_fragment
|
||||
}
|
||||
|
||||
override fun getTagName(): String {
|
||||
return TAG
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
//隐藏小地图
|
||||
hidePanel()
|
||||
}
|
||||
|
||||
override fun createPresenter(): BusPassengerPresenter {
|
||||
return BusPassengerPresenter(this)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val TAG = BusPassengerRouteFragment::class.java.simpleName
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -246,6 +246,7 @@ android {
|
||||
apply from: "./productFlavors/fPadLenovoOchBus.gradle"
|
||||
apply from: "./productFlavors/fPadLenovoOchTaxi.gradle"
|
||||
apply from: "./productFlavors/fPadLenovoOchBusPassenger.gradle"
|
||||
apply from: "./productFlavors/fPadLenovoOchBusPassengerM1.gradle"
|
||||
apply from: "./productFlavors/fPadLenovoOchTaxiPassenger.gradle"
|
||||
apply from: "./productFlavors/fPadLenovoOchSweeper.gradle"
|
||||
apply from: "./productFlavors/fMultiDisplayOchBus.gradle"
|
||||
@@ -289,6 +290,7 @@ android {
|
||||
if(names.contains("fPadLenovoOchBus")){
|
||||
}else if(names.contains("fPadLenovoOchBusPassenger")){
|
||||
}else if(names.contains("fMultiDisplayOchBus")){
|
||||
}else if(names.contains("fPadLenovoOchBusPassengerM1")){
|
||||
}else {
|
||||
setIgnore(true)
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ project.dependencies {
|
||||
fPadLenovoOchBusImplementation(rootProject.ext.dependencies.mogoochbus)
|
||||
// Bus乘客端
|
||||
fPadLenovoOchBusPassengerImplementation(rootProject.ext.dependencies.mogoochbus)
|
||||
fPadLenovoOchBusPassengerM1Implementation(rootProject.ext.dependencies.mogoochbus)
|
||||
|
||||
// taxi司机端
|
||||
fPadLenovoOchTaxiImplementation(rootProject.ext.dependencies.mogoochtaxi)
|
||||
@@ -33,6 +34,7 @@ project.dependencies {
|
||||
fPadLenovoOchBusImplementation (project(':OCH:mogo-och-bus'))
|
||||
// Bus乘客端
|
||||
fPadLenovoOchBusPassengerImplementation (project(':OCH:mogo-och-bus-passenger'))
|
||||
fPadLenovoOchBusPassengerM1Implementation (project(':OCH:mogo-och-bus-passenger'))
|
||||
|
||||
// taxi司机端
|
||||
fPadLenovoOchTaxiImplementation (project(':OCH:mogo-och-taxi'))
|
||||
|
||||
@@ -12,6 +12,7 @@ project.android.productFlavors {
|
||||
// 应用包名
|
||||
applicationId rootProject.ext.android.fLauncherApplicationId
|
||||
dimension "product"
|
||||
matchingFallbacks = ['base']
|
||||
|
||||
// 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
|
||||
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
|
||||
|
||||
37
app/productFlavors/fPadLenovoOchBusPassengerM1.gradle
Normal file
@@ -0,0 +1,37 @@
|
||||
project.android.productFlavors {
|
||||
// 衡阳-联想Pad-网约车-小巴车-乘客端
|
||||
fPadLenovoOchBusPassengerM1 {
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
}
|
||||
}
|
||||
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersionPadLenovo
|
||||
// 应用包名
|
||||
applicationId rootProject.ext.android.fLauncherApplicationId
|
||||
dimension "product"
|
||||
matchingFallbacks = ['m1']
|
||||
|
||||
// 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
|
||||
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchBusPassenger",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
buildConfigField 'int', 'GPS_PROVIDER', "1"
|
||||
|
||||
// 构建的应用身份类型,具体查看 README.md APP_IDENTITY_MODE规则
|
||||
buildConfigField 'String', 'APP_IDENTITY_MODE', "\"Bus_Passenger_Base\""
|
||||
// 连接的工控机IP地址
|
||||
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.103\""
|
||||
// 构建的是否是演示(美化)模式
|
||||
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
|
||||
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
|
||||
}
|
||||
}
|
||||