网约车 修复#845 #842 #846 #847 调试custom map 无法加载

This commit is contained in:
lianglihui
2021-07-01 12:44:25 +08:00
parent 685862cb96
commit dc5bbb5d66
10 changed files with 217 additions and 91 deletions

View File

@@ -180,7 +180,7 @@ class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > i
slidePanelView.setVisibility( View.VISIBLE );
slidePanelView.setText( getString( R.string.module_och_taxi_arrive_at_end_station ) );
mOrderStatus.setText( R.string.module_och_taxi_arrive_at_end_station2 );
showNotice( getString( R.string.module_och_taxi_order_complete) );
showNotice( getString( R.string.module_och_taxi_order_complete_1) );
} else if ( MogoOCHTaxiModel.getInstance().isOnTheWay2EndStation() ) {
Logger.d( TAG, "已经去往终点" );
slidePanelView.setVisibility( View.GONE );
@@ -429,7 +429,7 @@ class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > i
// showSlidePanle("滑动出发");
// showPanel();
} else {
AIAssist.getInstance(getContext()).speakTTSVoice("已收车");
// AIAssist.getInstance(getContext()).speakTTSVoice("已收车");
tvOperationStatus.setText("出车");
hideSlidePanel();
// hidPanel();
@@ -447,8 +447,10 @@ class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > i
if (status == OCHOrderStatus.None.getCode() || status == OCHOrderStatus.Cancel.getCode() || status == OCHOrderStatus.Completed.getCode() ){
getPanelView().setVisibility(View.INVISIBLE);
hideSlidePanel();
changeOperationViewVisible(View.VISIBLE);
}else {
getPanelView().setVisibility(View.VISIBLE);
changeOperationViewVisible(View.INVISIBLE);
}
updateOrderStatus();
});
@@ -504,7 +506,7 @@ class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > i
public void onArriveAt(AdasOCHData data) {
Logger.d( TAG, "行程结束");
MogoApisHandler.getInstance().getApis().getAdasControllerApi().cancelAutopilot();
AIAssist.getInstance( getContext() ).speakTTSVoice( "即将到达目的地,请您携带好随身物品,安全下车。" );
// AIAssist.getInstance( getContext() ).speakTTSVoice( "即将到达目的地,请您携带好随身物品,安全下车。" );
}
@Override

View File

@@ -4,7 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/module_och_taxi_layoutview"
android:layout_width="@dimen/module_mogo_och_autopilot_order_bg_width"
android:layout_height="@dimen/module_mogo_och_autopilot_order_bg_height"
android:layout_height="wrap_content"
android:minHeight="@dimen/module_mogo_och_autopilot_order_bg_height"
android:orientation="vertical">
<TextView
@@ -33,52 +34,159 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/module_och_taxi_order_status" />
<androidx.constraintlayout.widget.ConstraintLayout
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:id="@+id/module_och_taxi_order_status_stationInfo"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="0dp"-->
<!-- android:paddingLeft="@dimen/module_och_taxi_order_status_stationInfo_paddingLeft"-->
<!-- android:paddingTop="@dimen/module_och_taxi_order_status_stationInfo_paddingTop"-->
<!-- android:paddingRight="@dimen/module_och_taxi_order_status_stationInfo_paddingRight"-->
<!-- android:paddingBottom="@dimen/module_och_taxi_order_status_stationInfo_paddingBottom"-->
<!-- app:layout_constraintBottom_toTopOf="@+id/module_och_taxi_order_distance_container"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/module_och_taxi_order_status_divider">-->
<!-- <ImageView-->
<!-- android:id="@+id/greenDot"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:src="@drawable/module_mogo_och_icon_arriving_station"-->
<!-- app:layout_constraintBottom_toBottomOf="@+id/module_och_taxi_order_start_station"-->
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="@+id/module_och_taxi_order_start_station" />-->
<!-- <TextView-->
<!-- android:id="@+id/module_och_taxi_order_start_station"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginLeft="@dimen/module_och_taxi_order_start_station_marginLeft"-->
<!-- android:textColor="@color/module_och_order_status_textColor"-->
<!-- android:textSize="@dimen/module_och_taxi_order_start_station_textSize"-->
<!-- android:ellipsize="end"-->
<!-- android:maxWidth="252px"-->
<!-- android:lines="2"-->
<!-- android:textStyle="bold"-->
<!-- app:layout_constraintLeft_toRightOf="@+id/greenDot"-->
<!-- app:layout_constraintTop_toTopOf="parent"-->
<!-- tools:text="后路站后路站后路站后路站后路站" />-->
<!-- <TextView-->
<!-- android:id="@+id/module_och_taxi_order_start_station_anchor"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="上车"-->
<!-- android:textColor="@color/module_och_taxi_order_start_station_anchor_textColor"-->
<!-- android:layout_marginRight="@dimen/module_och_taxi_order_text_marginRight"-->
<!-- android:textSize="@dimen/module_och_taxi_order_start_station_anchor_textSize"-->
<!-- android:textStyle="bold"-->
<!-- app:layout_constraintBottom_toBottomOf="@+id/module_och_taxi_order_start_station"-->
<!-- app:layout_constraintRight_toRightOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="@+id/module_och_taxi_order_start_station" />-->
<!-- <ImageView-->
<!-- android:id="@+id/dotLine"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="0dp"-->
<!-- android:scaleType="fitXY"-->
<!-- android:src="@drawable/module_och_dot_line"-->
<!-- app:layout_constraintBottom_toTopOf="@+id/blueDot"-->
<!-- app:layout_constraintLeft_toLeftOf="@+id/greenDot"-->
<!-- app:layout_constraintRight_toRightOf="@+id/greenDot"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/greenDot" />-->
<!-- <ImageView-->
<!-- android:id="@+id/blueDot"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:src="@drawable/module_mogo_och_icon_arrived_station"-->
<!-- app:layout_constraintBottom_toBottomOf="@+id/module_och_taxi_order_end_station"-->
<!-- app:layout_constraintLeft_toLeftOf="@+id/greenDot"-->
<!-- app:layout_constraintTop_toTopOf="@+id/module_och_taxi_order_end_station" />-->
<!-- <TextView-->
<!-- android:id="@+id/module_och_taxi_order_end_station"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:textColor="@color/module_och_order_status_textColor"-->
<!-- android:textSize="@dimen/module_och_taxi_order_start_station_textSize"-->
<!-- android:textStyle="bold"-->
<!-- android:ellipsize="end"-->
<!-- android:maxWidth="252px"-->
<!-- android:lines="2"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintLeft_toLeftOf="@+id/module_och_taxi_order_start_station"-->
<!-- app:layout_constraintLeft_toRightOf="@+id/greenDot"-->
<!-- tools:text="后路站1" />-->
<!-- <TextView-->
<!-- android:id="@+id/module_och_taxi_order_end_station_anchor"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="下车"-->
<!-- android:layout_marginRight="@dimen/module_och_taxi_order_text_marginRight"-->
<!-- android:textColor="@color/module_och_taxi_order_end_station_anchor_textColor"-->
<!-- android:textSize="@dimen/module_och_taxi_order_end_station_anchor_textSize"-->
<!-- android:textStyle="bold"-->
<!-- app:layout_constraintBottom_toBottomOf="@+id/module_och_taxi_order_end_station"-->
<!-- app:layout_constraintRight_toRightOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="@+id/module_och_taxi_order_end_station" />-->
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
<LinearLayout
android:id="@+id/module_och_taxi_order_status_stationInfo"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="@dimen/module_och_taxi_order_status_stationInfo_paddingLeft"
android:paddingTop="@dimen/module_och_taxi_order_status_stationInfo_paddingTop"
android:paddingRight="@dimen/module_och_taxi_order_status_stationInfo_paddingRight"
android:paddingBottom="@dimen/module_och_taxi_order_status_stationInfo_paddingBottom"
app:layout_constraintBottom_toTopOf="@+id/module_och_taxi_order_distance_container"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/module_och_taxi_order_status_divider">
<ImageView
android:id="@+id/greenDot"
android:layout_width="wrap_content"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/module_mogo_och_icon_arriving_station"
app:layout_constraintBottom_toBottomOf="@+id/module_och_taxi_order_start_station"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="@+id/module_och_taxi_order_start_station" />
android:orientation="horizontal">
<ImageView
android:id="@+id/greenDot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/module_mogo_och_icon_arriving_station"
android:layout_centerVertical="true"
/>
<TextView
android:id="@+id/module_och_taxi_order_start_station"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/module_och_taxi_order_start_station_marginLeft"
android:textColor="@color/module_och_order_status_textColor"
android:textSize="@dimen/module_och_taxi_order_start_station_textSize"
android:textStyle="bold"
app:layout_constraintLeft_toRightOf="@+id/greenDot"
app:layout_constraintTop_toTopOf="parent"
tools:text="后路站" />
<TextView
android:id="@+id/module_och_taxi_order_start_station"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/module_och_taxi_order_start_station_marginLeft"
android:textColor="@color/module_och_order_status_textColor"
android:textSize="@dimen/module_och_taxi_order_start_station_textSize"
android:ellipsize="end"
android:maxWidth="252px"
android:lines="2"
android:textStyle="bold"
android:layout_toRightOf="@id/greenDot"
tools:text="后路站后路站后路站后路站后路站" />
<TextView
android:id="@+id/module_och_taxi_order_start_station_anchor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="上车"
android:textColor="@color/module_och_taxi_order_start_station_anchor_textColor"
android:layout_marginRight="@dimen/module_och_taxi_order_text_marginRight"
android:textSize="@dimen/module_och_taxi_order_start_station_anchor_textSize"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/module_och_taxi_order_start_station"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/module_och_taxi_order_start_station" />
<TextView
android:id="@+id/module_och_taxi_order_start_station_anchor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="上车"
android:textColor="@color/module_och_taxi_order_start_station_anchor_textColor"
android:layout_marginRight="@dimen/module_och_taxi_order_text_marginRight"
android:textSize="@dimen/module_och_taxi_order_start_station_anchor_textSize"
android:textStyle="bold"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
/>
</RelativeLayout>
<ImageView
android:id="@+id/dotLine"
@@ -91,43 +199,48 @@
app:layout_constraintRight_toRightOf="@+id/greenDot"
app:layout_constraintTop_toBottomOf="@+id/greenDot" />
<ImageView
android:id="@+id/blueDot"
android:layout_width="wrap_content"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/module_mogo_och_icon_arrived_station"
app:layout_constraintBottom_toBottomOf="@+id/module_och_taxi_order_end_station"
app:layout_constraintLeft_toLeftOf="@+id/greenDot"
app:layout_constraintTop_toTopOf="@+id/module_och_taxi_order_end_station" />
android:orientation="horizontal">
<ImageView
android:id="@+id/blueDot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/module_mogo_och_icon_arrived_station"
android:layout_centerVertical="true"
/>
<TextView
android:id="@+id/module_och_taxi_order_end_station"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/module_och_order_status_textColor"
android:textSize="@dimen/module_och_taxi_order_start_station_textSize"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@+id/module_och_taxi_order_start_station"
app:layout_constraintLeft_toRightOf="@+id/greenDot"
tools:text="后路站1" />
<TextView
android:id="@+id/module_och_taxi_order_end_station"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/module_och_taxi_order_start_station_marginLeft"
android:textColor="@color/module_och_order_status_textColor"
android:textSize="@dimen/module_och_taxi_order_start_station_textSize"
android:textStyle="bold"
android:ellipsize="end"
android:maxWidth="252px"
android:lines="2"
android:layout_toRightOf="@id/blueDot"
tools:text="后路站后路站后路站后路站后路站" />
<TextView
android:id="@+id/module_och_taxi_order_end_station_anchor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="下车"
android:layout_marginRight="@dimen/module_och_taxi_order_text_marginRight"
android:textColor="@color/module_och_taxi_order_end_station_anchor_textColor"
android:textSize="@dimen/module_och_taxi_order_end_station_anchor_textSize"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/module_och_taxi_order_end_station"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/module_och_taxi_order_end_station" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/module_och_taxi_order_end_station_anchor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="下车"
android:layout_marginRight="@dimen/module_och_taxi_order_text_marginRight"
android:textColor="@color/module_och_taxi_order_end_station_anchor_textColor"
android:textSize="@dimen/module_och_taxi_order_end_station_anchor_textSize"
android:textStyle="bold"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
/>
</RelativeLayout>
</LinearLayout>
<FrameLayout
android:id="@+id/module_och_taxi_order_distance_container"
android:layout_width="match_parent"

View File

@@ -6,6 +6,7 @@
<string name="module_och_taxi_order_distance_anchor_text">预计里程</string>
<string name="module_och_taxi_order_distance_text_ph">3.2 km</string>
<string name="module_och_taxi_order_complete">请携带好随身物品,注意侧后\n方来车感谢体验蘑菇智行自\n动驾驶车</string>
<string name="module_och_taxi_order_complete_1">即将到达目的地,请您携带好随身物品,安全下车。</string>
<string name="module_och_taxi_on_the_way_2_end_station">去往下车地点</string>
<string name="module_och_taxi_waiting">已到达,等待乘客上车</string>
<string name="module_och_taxi_new_order">收到新订单,前往上车地点</string>

View File

@@ -256,4 +256,9 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
public abstract void restartAutopilot();
public void changeOperationViewVisible(int visible){
getActivity().runOnUiThread(() -> {
tvOperationStatus.setVisibility(visible);
});
}
}

View File

@@ -95,6 +95,7 @@ class AMapApiBuilder implements IMogoMapApiBuilder {
@Override
public IMogoMapView getMapView( Context context ) {
Logger.e("lianglihui","AMapApiBuilder getMapView");
IMogoMapView mapView = AMapViewHandler.getMapView();
if ( mapView != null
&& mapView.getMapView() != null

View File

@@ -114,6 +114,7 @@ public class AMapViewWrapper implements IMogoMapView,
public AMapViewWrapper(MapAutoView mMapView) {
startTime = System.currentTimeMillis();
Logger.i(TAG, "autoop--AMapViewWrapper: init");
Logger.i("lianglihui", "autoop--AMapViewWrapper: init");
this.mMapView = mMapView;
if (DebugConfig.isDebug()) {
GpsTester.getInstance().init(mMapView);

View File

@@ -94,6 +94,7 @@ class CustomMapApiBuilder implements IMogoMapApiBuilder {
@Override
public IMogoMapView getMapView( Context context ) {
Log.d(TAG,"setDebugMode==true");
Log.d("lianglihui","setDebugMode==true");
NavAutoApi.INSTANCE.init( context, MapParams.Companion.init()
.setDebugMode( true )
.setDataFileSource(1) //todo 使用本地地图数据

View File

@@ -96,6 +96,7 @@ public class AMapUIController implements IMogoMapUIController {
@Override
public VisualAngleMode getCurrentMapVisualAngle() {
Logger.e("lianglihui","amapUIcontroller ");
if (mClient != null) {
return mClient.getCurrentMapVisualAngle();
}

View File

@@ -7,6 +7,8 @@ import android.widget.FrameLayout;
import androidx.annotation.Nullable;
import com.mogo.utils.logger.Logger;
/**
* @author congtaowang
@@ -34,6 +36,7 @@ public abstract class MogoBaseMapView extends FrameLayout implements ILifeCycle
}
private void init( Context context ) {
Logger.e("lianglihui","MogoBaseMapView");
addMapView( context );
if (mMapView != null){
MogoMap.getInstance().init( getContext(), mMapView.getMap() );

View File

@@ -353,8 +353,6 @@ public class MogoADASController implements IMogoADASController {
//测试网约车
//testOCH();
// TODO: 2021/6/30 临时解决方案
timeLoop();
}
@Override
@@ -758,7 +756,7 @@ public class MogoADASController implements IMogoADASController {
adasProvider.removeAdasStatusListener();
//AutopilotServiceManage.getInstance().release();
//关闭定时任务
if (mDisposable != null) mDisposable.dispose();
// if (mDisposable != null) mDisposable.dispose();
}
@Override
@@ -946,22 +944,22 @@ public class MogoADASController implements IMogoADASController {
mAdasDataListener.cameraEyeDetectResult(json);
}
private static final int PERIOD = 5 * 1000;
private static final int DELAY = 10000;
private Disposable mDisposable;
/**
* 定时循环任务
*/
private void timeLoop() {
mDisposable = Observable.interval(DELAY, PERIOD, TimeUnit.MILLISECONDS)
.map((aLong -> aLong + 1))
.subscribeOn(Schedulers.io())
.subscribe(aLong ->
adasProvider.setBasicInfo()
);//getUnreadCount()执行的任务
}
//
// private static final int PERIOD = 5 * 1000;
// private static final int DELAY = 10000;
// private Disposable mDisposable;
//
// /**
// * 定时循环任务
// */
// private void timeLoop() {
// mDisposable = Observable.interval(DELAY, PERIOD, TimeUnit.MILLISECONDS)
// .map((aLong -> aLong + 1))
// .subscribeOn(Schedulers.io())
// .subscribe(aLong ->
// adasProvider.setBasicInfo()
// );//getUnreadCount()执行的任务
// }
}