Merge remote-tracking branch 'origin/dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0' into dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0
This commit is contained in:
@@ -76,12 +76,6 @@ dependencies {
|
||||
implementation project(":OCH:mogo-och-common-module")
|
||||
compileOnly project(":libraries:mogo-map")
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
}else {
|
||||
implementation project(':foudations:mogo-aicloud-services-sdk')
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
}
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
@@ -29,7 +29,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
@@ -272,7 +272,7 @@ public class BusPassengerModel {
|
||||
IntentManager.getInstance().registerIntentListener(ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener );
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener );
|
||||
// 定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
|
||||
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener);
|
||||
@@ -284,7 +284,7 @@ public class BusPassengerModel {
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
// 注销定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
|
||||
MogoAiCloudSocketManager.getInstance(mContext)
|
||||
.unregisterLifecycleListener(10010);
|
||||
|
||||
@@ -29,7 +29,7 @@ import com.amap.api.maps.model.Polyline;
|
||||
import com.amap.api.maps.model.PolylineOptions;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.bus.passenger.R;
|
||||
import com.mogo.och.bus.passenger.callback.IBusPassengerMapViewCallback;
|
||||
@@ -103,14 +103,14 @@ public class BusPassengerMapDirectionView
|
||||
initAMapView();
|
||||
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
private void initAMapView() {
|
||||
|
||||
@@ -20,7 +20,7 @@ import com.mogo.och.bus.passenger.ui.PM2BaseFragment
|
||||
* Created on 2022/3/29
|
||||
*/
|
||||
@Route(path = BusPassengerConst.PATH)
|
||||
class MogoOCHBusPassenger : IMogoOCH, IMogoStatusChangedListener {
|
||||
class MogoOCHBusPassenger : IMogoOCH {
|
||||
private var mActivity: FragmentActivity? = null
|
||||
private var mContainerId = 0
|
||||
private var mPM2Fragment: PM2BaseFragment? = null
|
||||
@@ -28,6 +28,7 @@ class MogoOCHBusPassenger : IMogoOCH, IMogoStatusChangedListener {
|
||||
override fun createCoverage(activity: FragmentActivity?, containerId: Int?): Fragment? {
|
||||
mActivity = activity
|
||||
mContainerId = containerId!!
|
||||
showFragment()
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -40,18 +41,6 @@ class MogoOCHBusPassenger : IMogoOCH, IMogoStatusChangedListener {
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,29 +14,15 @@ class URLConst {
|
||||
private const val Shettle_BASE_URL_OCH_QA = "https://och-driver-qa.zhidaozhixing.com"
|
||||
private const val Shettle_BASE_URL_OCH_RELEASE = "https://och-driver.zhidaozhixing.com"
|
||||
|
||||
private const val BASE_URL_OCH_DEV = "http://tech-dev.zhidaohulian.com"
|
||||
private const val BASE_URL_OCH_QA = "https://tech-qa.zhidaohulian.com"
|
||||
private const val BASE_URL_OCH_RELEASE = "https://tech.zhidaohulian.com"
|
||||
|
||||
|
||||
@JvmStatic
|
||||
fun getBaseUrl(): String {
|
||||
return if(AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)){
|
||||
when (DebugConfig.getNetMode()) {
|
||||
return when (DebugConfig.getNetMode()) {
|
||||
DebugConfig.NET_MODE_DEV, DebugConfig.NET_MODE_DEMO -> Shettle_BASE_URL_OCH_DEV
|
||||
DebugConfig.NET_MODE_QA -> Shettle_BASE_URL_OCH_QA
|
||||
DebugConfig.NET_MODE_RELEASE -> Shettle_BASE_URL_OCH_RELEASE
|
||||
else -> Shettle_BASE_URL_OCH_RELEASE
|
||||
}
|
||||
}else{
|
||||
when (DebugConfig.getNetMode()) {
|
||||
DebugConfig.NET_MODE_DEV, DebugConfig.NET_MODE_DEMO -> BASE_URL_OCH_DEV
|
||||
DebugConfig.NET_MODE_QA -> BASE_URL_OCH_QA
|
||||
DebugConfig.NET_MODE_RELEASE -> BASE_URL_OCH_RELEASE
|
||||
else -> BASE_URL_OCH_RELEASE
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
@@ -74,7 +74,8 @@ class PM2DrivingModel private constructor() {
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, mAutoPilotStatusListener)
|
||||
|
||||
// 定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, mMapLocationListener)
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, mMapLocationListener)
|
||||
CallerChassisLocationGCJ02ListenerManager.setListenerHz(TAG,5)//设置5hz, 1s返回一次
|
||||
}
|
||||
|
||||
public fun releaseListener(){
|
||||
@@ -82,7 +83,7 @@ class PM2DrivingModel private constructor() {
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
|
||||
// 定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
fun setDrivingInfoCallback(drivingInfoCallback : DrivingInfoCallback?){
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.mogo.och.bus.passenger.ui.video
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.presenter.PM2VideoPresenter
|
||||
import com.mogo.och.bus.passenger.ui.widget.video.RotationItem
|
||||
import kotlinx.android.synthetic.m2.p_m2_video_fragment.*
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
@@ -10,21 +12,13 @@ import com.mogo.och.bus.passenger.presenter.PM2VideoPresenter
|
||||
*/
|
||||
class PM2VideoFragment :
|
||||
MvpFragment<PM2VideoFragment?, PM2VideoPresenter?>() {
|
||||
/**
|
||||
* 改变自动驾驶状态
|
||||
*
|
||||
* @param status 2 - running 1 - enable 2 - disable
|
||||
*/
|
||||
|
||||
private var arrayListOf = mutableListOf<RotationItem>()
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.p_m2_video_fragment
|
||||
}
|
||||
|
||||
override fun getTagName(): String {
|
||||
return TAG
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
}
|
||||
|
||||
override fun createPresenter(): PM2VideoPresenter {
|
||||
return PM2VideoPresenter(this)
|
||||
@@ -33,4 +27,59 @@ class PM2VideoFragment :
|
||||
companion object {
|
||||
private val TAG = PM2VideoFragment::class.java.simpleName
|
||||
}
|
||||
|
||||
override fun getTagName(): String {
|
||||
return TAG
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
initResourceData()
|
||||
image_video_rotation_view.setData(arrayListOf)
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
image_video_rotation_view.setPause()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
image_video_rotation_view.setResume()
|
||||
}
|
||||
|
||||
private fun initResourceData() {
|
||||
arrayListOf.clear()
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1656558672856/小宝宝.mp4",
|
||||
0,
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1656559345882/1.png",
|
||||
"小宝宝"
|
||||
)
|
||||
)
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1656559367261/2.png",
|
||||
0,
|
||||
"",
|
||||
"小猫"
|
||||
)
|
||||
)
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1656558730074/星空.mp4",
|
||||
1,
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1656559406169/4.png",
|
||||
"星空"
|
||||
)
|
||||
)
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1656559384635/3.png",
|
||||
0,
|
||||
"",
|
||||
"大海"
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import com.bumptech.glide.Glide
|
||||
class AdvanceImageView @JvmOverloads constructor(
|
||||
context: Context, attrs: AttributeSet? = null
|
||||
) : RelativeLayout(context, attrs) {
|
||||
|
||||
private var imageView: ImageView? = null
|
||||
|
||||
init {
|
||||
@@ -22,10 +23,10 @@ class AdvanceImageView @JvmOverloads constructor(
|
||||
private fun initView() {
|
||||
imageView = ImageView(context)
|
||||
imageView?.scaleType = ImageView.ScaleType.FIT_XY
|
||||
addView(imageView, LayoutParams(-1,-1))
|
||||
addView(imageView, LayoutParams(-1, -1))
|
||||
}
|
||||
|
||||
public fun setImagePath(path: String){
|
||||
fun setImagePath(path: String){
|
||||
imageView?.let { Glide.with(context).load(path).into(it) }
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,159 @@
|
||||
package com.mogo.och.bus.passenger.ui.widget.video
|
||||
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.viewpager.widget.PagerAdapter
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/2/6
|
||||
*/
|
||||
class AdvancePagerAdapter: PagerAdapter() {
|
||||
class AdvancePagerAdapter(context: Context, viewPager: ViewPager): PagerAdapter(),
|
||||
ViewPager.OnPageChangeListener {
|
||||
|
||||
private val mContext: Context = context
|
||||
private val mViewPager: ViewPager = viewPager
|
||||
|
||||
private var dataList = mutableListOf<RotationItem>()
|
||||
private var viewList = mutableListOf<View>()
|
||||
|
||||
private var lastPosition = -1
|
||||
|
||||
private var current = 0
|
||||
private val time = 5000
|
||||
private val pause = false
|
||||
private var thread: Thread? = null
|
||||
|
||||
fun setData(list: MutableList<RotationItem>){
|
||||
if (list.isEmpty()) return
|
||||
dataList.addAll(list)
|
||||
|
||||
viewList.clear()
|
||||
|
||||
list.forEach {
|
||||
addView(it)
|
||||
}
|
||||
|
||||
mViewPager.addOnPageChangeListener(this)
|
||||
|
||||
notifyDataSetChanged()
|
||||
|
||||
mViewPager.currentItem = 0
|
||||
|
||||
if (list.size > 0) {
|
||||
if (list[0].type == 1) {//有人反应第一个是视频不播放这边优化了一下
|
||||
var video = list[mViewPager.currentItem] as AdvanceVideoView
|
||||
video.setVideo {
|
||||
mViewPager.setCurrentItem(mViewPager.currentItem + 1, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getCount(): Int {
|
||||
TODO("Not yet implemented")
|
||||
return dataList.size
|
||||
}
|
||||
|
||||
override fun isViewFromObject(view: View, `object`: Any): Boolean {
|
||||
TODO("Not yet implemented")
|
||||
return view === `object`
|
||||
}
|
||||
|
||||
public fun setData(list: MutableList<RotationItem>){
|
||||
override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) {
|
||||
container.removeView(viewList[position])
|
||||
}
|
||||
|
||||
override fun instantiateItem(container: ViewGroup, position: Int): Any {
|
||||
val view: View = viewList[position]
|
||||
container.addView(view)
|
||||
return view
|
||||
|
||||
}
|
||||
|
||||
public fun setPause(){
|
||||
override fun getItemPosition(`object`: Any): Int {
|
||||
return POSITION_NONE
|
||||
}
|
||||
|
||||
private fun addView(item: RotationItem) {
|
||||
if (item.type === 1) { // 表示视频
|
||||
var videoView = AdvanceVideoView(mContext)
|
||||
videoView.setCacheImageView(item.cacheImgPath)
|
||||
videoView.setVideoPath(item.path)
|
||||
viewList.add(videoView)
|
||||
} else { // 表示图片
|
||||
var imageView = AdvanceImageView(mContext)
|
||||
imageView.setImagePath(item.path)
|
||||
viewList.add(imageView)
|
||||
}
|
||||
}
|
||||
|
||||
fun setPause(){
|
||||
|
||||
}
|
||||
|
||||
public fun setResume(){
|
||||
fun setResume(){
|
||||
|
||||
}
|
||||
|
||||
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
|
||||
}
|
||||
|
||||
override fun onPageSelected(position: Int) {
|
||||
}
|
||||
|
||||
override fun onPageScrollStateChanged(state: Int) {
|
||||
// 由于viewpager的预加载机制onPageSelected这里面加载videoview 放的跟玩一样 等操作完成后再播放videoview就香了 很丝滑
|
||||
if (state == 0) { //静止,什么都没做
|
||||
if (viewList.size > 1) { //多于1,才会循环跳转
|
||||
if (lastPosition != -1 && lastPosition != mViewPager.currentItem
|
||||
&& viewList[lastPosition] is AdvanceVideoView) {
|
||||
var videoView: AdvanceVideoView = viewList[lastPosition] as AdvanceVideoView
|
||||
videoView.setPause()
|
||||
}
|
||||
if (mViewPager.currentItem < 1) { //首位之前,跳转到末尾(N)
|
||||
var position = dataList.size //注意这里是mList,而不是mViews
|
||||
mViewPager.setCurrentItem(position, false)
|
||||
} else if (mViewPager.currentItem > dataList.size) { //末位之后,跳转到首位(1)
|
||||
mViewPager.setCurrentItem(1, false) //false:不显示跳转过程的动画
|
||||
}
|
||||
current = 0//换页重新计算时间
|
||||
if (viewList[mViewPager.currentItem] is AdvanceVideoView) {
|
||||
|
||||
(viewList[mViewPager.currentItem] as AdvanceVideoView).setVideo {
|
||||
mViewPager.setCurrentItem(mViewPager.currentItem + 1, true)
|
||||
}
|
||||
|
||||
}else if (viewList[mViewPager.currentItem] is AdvanceImageView){
|
||||
startTimer()
|
||||
}
|
||||
lastPosition = mViewPager.currentItem
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun startTimer() {
|
||||
if (null != thread && !thread?.isInterrupted!!) {
|
||||
thread?.interrupt()
|
||||
thread = null
|
||||
}
|
||||
thread = Thread{
|
||||
while (null != thread && !thread?.isInterrupted!!) {
|
||||
try {
|
||||
Thread.sleep(1000)
|
||||
if (!pause && viewList[mViewPager.currentItem] !is AdvanceVideoView)
|
||||
current += 1000
|
||||
if (current >= time) {
|
||||
mViewPager.post {
|
||||
mViewPager.setCurrentItem(mViewPager.currentItem + 1, true)
|
||||
}
|
||||
current = 0
|
||||
}
|
||||
} catch (e: InterruptedException) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
thread?.start()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.mogo.och.bus.passenger.ui.widget.video
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Color
|
||||
import android.media.MediaMetadataRetriever
|
||||
import android.media.MediaPlayer
|
||||
import android.util.AttributeSet
|
||||
import android.widget.ImageView
|
||||
import android.widget.RelativeLayout
|
||||
import android.widget.VideoView
|
||||
import com.bumptech.glide.Glide
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import java.lang.RuntimeException
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/2/8
|
||||
*/
|
||||
class AdvanceVideoView @JvmOverloads constructor(
|
||||
context: Context, attrs: AttributeSet? = null
|
||||
) : RelativeLayout(context, attrs) {
|
||||
|
||||
private var videoRelativeLayout: RelativeLayout? = null
|
||||
private var cacheImage: ImageView? = null
|
||||
private var videoView: VideoView? = null
|
||||
private var path: String? = null
|
||||
|
||||
init {
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
videoRelativeLayout = RelativeLayout(context)
|
||||
addView(videoRelativeLayout, LayoutParams(-1, -1))
|
||||
cacheImage = ImageView(context)
|
||||
cacheImage?.scaleType = ImageView.ScaleType.FIT_XY
|
||||
addView(cacheImage, LayoutParams(-1, -1))
|
||||
}
|
||||
|
||||
fun setVideoPath(path: String){
|
||||
this.path = path
|
||||
}
|
||||
|
||||
|
||||
fun setCacheImageView(imgPath: String){
|
||||
cacheImage?.visibility = VISIBLE
|
||||
cacheImage?.let { Glide.with(context).load(imgPath).into(it) }
|
||||
}
|
||||
|
||||
fun setVideo(onCompletionListener : MediaPlayer.OnCompletionListener) {
|
||||
if (videoView != null){
|
||||
videoRelativeLayout?.removeView(videoView)
|
||||
videoView = null
|
||||
}
|
||||
|
||||
//视频播放控件
|
||||
videoView = VideoView(context)
|
||||
videoView?.setVideoPath(path)
|
||||
videoView?.setBackgroundColor(Color.TRANSPARENT)
|
||||
|
||||
var layoutParams = LayoutParams(-1, -1)
|
||||
//设置videoview占满父view播放
|
||||
layoutParams.addRule(ALIGN_PARENT_LEFT)
|
||||
layoutParams.addRule(ALIGN_PARENT_RIGHT)
|
||||
layoutParams.addRule(ALIGN_PARENT_TOP)
|
||||
layoutParams.addRule(ALIGN_PARENT_BOTTOM)
|
||||
videoRelativeLayout?.addView(videoView, layoutParams)
|
||||
videoView?.setOnCompletionListener(onCompletionListener)
|
||||
videoView?.start()
|
||||
|
||||
videoView?.setOnPreparedListener {
|
||||
UiThreadHandler.postDelayed({
|
||||
cacheImage?.visibility = GONE
|
||||
},500)
|
||||
}
|
||||
|
||||
videoView?.setOnCompletionListener(onCompletionListener)
|
||||
}
|
||||
|
||||
fun setPause() {
|
||||
if (videoView != null) {
|
||||
videoView?.pause()
|
||||
}
|
||||
}
|
||||
|
||||
fun setRestart() {
|
||||
if (videoView != null) {
|
||||
videoView?.start()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载首帧,作为视频缓存显示的图片
|
||||
*/
|
||||
private fun loadCacheImage(){
|
||||
Thread {
|
||||
var retriever = MediaMetadataRetriever()
|
||||
var bitmap: Bitmap? = null
|
||||
try {
|
||||
if (path?.contains("http") == true){
|
||||
retriever.setDataSource(path, HashMap<String,String>())
|
||||
}else{
|
||||
retriever.setDataSource(path)
|
||||
}
|
||||
bitmap = retriever.frameAtTime
|
||||
}catch (ex: Exception){
|
||||
ex.printStackTrace()
|
||||
}finally {
|
||||
try {
|
||||
retriever.release()
|
||||
}catch (e: RuntimeException){
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
if (bitmap != null) {
|
||||
UiThreadHandler.post {
|
||||
// setCacheImageView(bitmap)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,7 @@ package com.mogo.och.bus.passenger.ui.widget.video
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.widget.RelativeLayout
|
||||
import androidx.viewpager.widget.PagerAdapter
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/2/6
|
||||
@@ -23,20 +21,21 @@ class ImageAndVideoRotation @JvmOverloads constructor(
|
||||
|
||||
private fun initView() {
|
||||
viewPager = ViewPager(context)
|
||||
pagerAdapter = AdvancePagerAdapter()
|
||||
pagerAdapter = AdvancePagerAdapter(context, viewPager!!)
|
||||
viewPager?.adapter = pagerAdapter
|
||||
addView(viewPager, LayoutParams(-1,-1))
|
||||
|
||||
addView(viewPager, LayoutParams(-1, -1))
|
||||
}
|
||||
|
||||
public fun setData(list: MutableList<RotationItem>){
|
||||
fun setData(list: MutableList<RotationItem>){
|
||||
pagerAdapter?.setData(list)
|
||||
}
|
||||
|
||||
public fun setPause(){
|
||||
fun setPause(){
|
||||
pagerAdapter?.setPause()
|
||||
}
|
||||
|
||||
public fun setResume(){
|
||||
fun setResume(){
|
||||
pagerAdapter?.setResume()
|
||||
}
|
||||
}
|
||||
@@ -3,5 +3,10 @@ package com.mogo.och.bus.passenger.ui.widget.video
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/2/6
|
||||
* type:0 图片
|
||||
* type:1 视频
|
||||
*/
|
||||
data class RotationItem(var path: String, var type: String)
|
||||
data class RotationItem(var path: String,
|
||||
var type: Int,
|
||||
var cacheImgPath: String,
|
||||
var title: String)
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
|
||||
<!-- 全览地图带站点-->
|
||||
<com.mogo.eagle.core.function.overview.view.OverMapView
|
||||
<com.mogo.eagle.core.function.view.OverMapView
|
||||
android:id="@+id/overMapView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_600"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/driving_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="@dimen/dp_853"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/hd_map_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="@dimen/dp_853"
|
||||
app:layout_constraintTop_toBottomOf="@+id/driving_fragment"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/video_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="@dimen/dp_853"
|
||||
app:layout_constraintTop_toBottomOf="@+id/hd_map_fragment"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
|
||||
@@ -4,22 +4,28 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- 高精地图 消息盒子-->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="这是hdMap"
|
||||
android:textSize="@dimen/dp_60"/>
|
||||
<!-- 高精地图 -->
|
||||
|
||||
<!-- 消息盒子气泡 -->
|
||||
<!--<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView-->
|
||||
<!-- android:layout_width=""-->
|
||||
<!-- android:layout_height=""/>-->
|
||||
<com.mogo.eagle.core.function.view.MapBizView
|
||||
android:id="@+id/mapBizView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<!-- 消息盒子气泡-->
|
||||
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView-->
|
||||
<!-- android:id="@+id/box_bubble_view"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent" />-->
|
||||
|
||||
<!--pnc行为决策-->
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView-->
|
||||
<!-- android:layout_width=""-->
|
||||
<!-- android:layout_height=""/>-->
|
||||
<!-- android:id="@+id/pnc_actions_view"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent" />-->
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -6,12 +6,9 @@
|
||||
|
||||
<!-- 图片或视频广告-->
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="这是video"
|
||||
android:textSize="@dimen/dp_60"/>
|
||||
<com.mogo.och.bus.passenger.ui.widget.video.ImageAndVideoRotation
|
||||
android:id="@+id/image_video_rotation_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -30,7 +30,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
@@ -151,7 +151,7 @@ public class OrderModel {
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
loginService = (LoginService) ARouter.getInstance().build(OchCommonConst.LOGINSERVICE).navigation();
|
||||
// 定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
|
||||
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
@@ -331,7 +331,7 @@ public class OrderModel {
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
// 注销定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
|
||||
//自动驾驶路线规划接口
|
||||
CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
|
||||
@@ -60,20 +60,17 @@ dependencies {
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
api rootProject.ext.dependencies.mogoutils
|
||||
api rootProject.ext.dependencies.mogocommons
|
||||
api rootProject.ext.dependencies.mogo_core_data
|
||||
api rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
api rootProject.ext.dependencies.mogo_core_function_hmi
|
||||
api rootProject.ext.dependencies.mogo_core_function_map
|
||||
}else {
|
||||
api project(":core:mogo-core-utils")
|
||||
api project(":foudations:mogo-commons")
|
||||
api project(':core:mogo-core-data')
|
||||
api project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
api project(':core:function-impl:mogo-core-function-hmi')
|
||||
api project(':core:function-impl:mogo-core-function-map')
|
||||
}
|
||||
|
||||
implementation project(':libraries:mogo-adas')
|
||||
compileOnly project(':libraries:mogo-adas')
|
||||
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import android.content.Context
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
@@ -36,7 +36,7 @@ object OchCommonLoginModel : IMoGoChassisLocationGCJ02Listener {
|
||||
fun init(context: Context) {
|
||||
mContext = context.applicationContext
|
||||
// 达到起始站围栏监听
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
fun hasInit(): Boolean {
|
||||
@@ -65,7 +65,7 @@ object OchCommonLoginModel : IMoGoChassisLocationGCJ02Listener {
|
||||
mContext = null
|
||||
iTaxiLoginCallback = null
|
||||
// 注销到达起始站围栏监听
|
||||
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,12 +4,10 @@ import android.content.Context;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatisticsListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics;
|
||||
|
||||
@@ -60,7 +60,6 @@ dependencies {
|
||||
}else {
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-hmi')
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
@@ -123,7 +123,7 @@ public class SweeperOrderModel {
|
||||
public void init() {
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
// 定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
|
||||
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
@@ -248,7 +248,7 @@ public class SweeperOrderModel {
|
||||
startOrStopOrderLoop(false);
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
// 注销定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
|
||||
//自动驾驶路线规划接口
|
||||
CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
|
||||
@@ -57,11 +57,6 @@ dependencies {
|
||||
implementation project(":OCH:mogo-och-common-module")
|
||||
compileOnly project(":libraries:mogo-map")
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
}else {
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
}
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
@@ -34,7 +34,7 @@ import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener;
|
||||
import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager;
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager;
|
||||
@@ -241,7 +241,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
IntentManager.getInstance().registerIntentListener( ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener );
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
// 定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
|
||||
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener);
|
||||
@@ -261,7 +261,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
// 注销定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
|
||||
MogoAiCloudSocketManager.getInstance(mContext)
|
||||
.unregisterLifecycleListener(10010);
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.amap.api.maps.model.PolylineOptions;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.taxi.passenger.R;
|
||||
import com.mogo.och.taxi.passenger.callback.ITaxiPassengerMapViewCallback;
|
||||
@@ -104,14 +104,14 @@ public class TaxiPassengerMapDirectionView
|
||||
initAMapView();
|
||||
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
private void initAMapView() {
|
||||
|
||||
@@ -55,11 +55,6 @@ dependencies {
|
||||
implementation project(":OCH:mogo-och-common-module")
|
||||
compileOnly project(":libraries:mogo-map")
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
}else {
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
}
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
@@ -32,7 +32,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
@@ -223,7 +223,7 @@ public class TaxiModel {
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
//定位监听, 传false是高德坐标系
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationLIstener);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG,mMapLocationLIstener);
|
||||
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener);
|
||||
@@ -262,7 +262,7 @@ public class TaxiModel {
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
// 注销地图监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
|
||||
OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener(OCHSocketMessageManager.msgMonitorType);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.amap.api.maps.model.PolylineOptions;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.taxi.R;
|
||||
import com.mogo.och.taxi.utils.TaxiMapAssetStyleUtil;
|
||||
@@ -98,14 +98,14 @@ public class TaxiMapDirectionView
|
||||
initAMapView();
|
||||
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
private void initAMapView() {
|
||||
|
||||
Reference in New Issue
Block a user