探路事件弹框迁移到v2x
This commit is contained in:
@@ -51,6 +51,8 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.rxjava
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.localbroadcastmanager
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
compileOnly rootProject.ext.dependencies.mogomap
|
||||
compileOnly rootProject.ext.dependencies.mogoutils
|
||||
@@ -72,6 +74,11 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.videoarm64
|
||||
implementation rootProject.ext.dependencies.videojava
|
||||
implementation rootProject.ext.dependencies.eventbus
|
||||
implementation project(path: ':modules:mogo-module-v2x')
|
||||
implementation project(path: ':modules:mogo-module-v2x')
|
||||
implementation project(path: ':modules:mogo-module-v2x')
|
||||
implementation project(path: ':modules:mogo-module-v2x')
|
||||
implementation project(path: ':modules:mogo-module-v2x')
|
||||
|
||||
// if( Boolean.valueOf(RELEASE)){
|
||||
// implementation rootProject.ext.dependencies.moduletanlulib
|
||||
|
||||
@@ -20,6 +20,7 @@ import android.view.animation.LinearInterpolator;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.PagerSnapHelper;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@@ -53,6 +54,8 @@ import com.mogo.module.common.entity.MarkerExploreWayItem;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.entity.MarkerUserInfo;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.tanlu.R;
|
||||
import com.mogo.module.tanlu.callback.DataSetChangedAdapter;
|
||||
import com.mogo.module.tanlu.callback.NaviCallback;
|
||||
@@ -79,6 +82,7 @@ import com.mogo.module.tanlu.model.event.VoiceControlUpInfo;
|
||||
import com.mogo.module.tanlu.util.Utils;
|
||||
import com.mogo.module.tanlu.view.NetErrorDialog;
|
||||
import com.mogo.module.tanlu.view.UploadFailedDialog;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
import com.mogo.service.analytics.IMogoAnalytics;
|
||||
@@ -365,15 +369,18 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
|
||||
mMogoRegisterCenter.registerMogoMarkerClickListener(TanluConstants.MODEL_NAME, new IMogoMarkerClickListener() {
|
||||
@Override
|
||||
public boolean onMarkerClicked(IMogoMarker marker) {
|
||||
GSYVideoManager.releaseAllVideos();
|
||||
initVideo();
|
||||
releaseTimer();
|
||||
//埋点
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("type", "2");
|
||||
mAnalytics.track(TanluConstants.LAUNCHER_ICON_CLICK, properties);
|
||||
|
||||
//点击的marker的具体数据
|
||||
MarkerExploreWay exploreWay = extractFromMarker(marker);
|
||||
V2XRoadEventEntity roadEventEntity = new V2XRoadEventEntity();
|
||||
roadEventEntity.setNoveltyInfo(exploreWay);
|
||||
roadEventEntity.setPoiType(exploreWay.getPoiType());
|
||||
|
||||
V2XMessageEntity v2XMessageEntity = new V2XMessageEntity();
|
||||
v2XMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING);
|
||||
v2XMessageEntity.setShowState(true);
|
||||
|
||||
v2XMessageEntity.setContent(roadEventEntity);
|
||||
//更新数据
|
||||
if (markerExploreWayList != null) {
|
||||
markerExploreWayList.clear();
|
||||
@@ -382,43 +389,14 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
|
||||
}
|
||||
markerExploreWayList.add(exploreWay);
|
||||
|
||||
boolean isAdd = TanluServiceManager.getIMogoTopViewManager().isViewAdded(TanluListWindow.this);
|
||||
hideWindowTimerStart();
|
||||
Logger.d(TAG, "onMarkerClicked ------ isAdd = " + isAdd);
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(getContext()).sendBroadcast(intent);
|
||||
|
||||
//添加window窗口,重复创建
|
||||
if (!isAdd) {
|
||||
ViewGroup.LayoutParams layoutParams =
|
||||
new ViewGroup.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
(int) getContext().getResources().getDimension((R.dimen.tanlu_module_card_height)));
|
||||
TanluServiceManager.getIMogoTopViewManager().addView(TanluListWindow.this, layoutParams, new IMogoTopViewStatusListener() {
|
||||
@Override
|
||||
public void onViewAdded(View view) {
|
||||
Logger.d(TAG, "onViewAdded -------->");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewRemoved(View view) {
|
||||
Logger.e(TAG, "onViewRemoved -------->");
|
||||
releaseTimer();
|
||||
releaseAction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeViewAddAnim(View view) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeViewRemoveAnim(View view) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
renderCardViews();
|
||||
//埋点
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("type", "2");
|
||||
mAnalytics.track(TanluConstants.LAUNCHER_ICON_CLICK, properties);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -481,7 +459,7 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
|
||||
if (mogoIntentManager != null) {
|
||||
// 同行者 xxx堵不堵唤醒词语音注册
|
||||
Logger.d(TAG, "initListener====");
|
||||
mogoIntentManager.registerIntentListener(TXZ_SPECIFIEDROAD_SEARCH,mogoIntentListener);
|
||||
mogoIntentManager.registerIntentListener(TXZ_SPECIFIEDROAD_SEARCH, mogoIntentListener);
|
||||
// 通用唤醒词语音注册
|
||||
mogoIntentManager.registerIntentListener(SPECIFIEDROAD_SEARCH, mogoIntentListener);
|
||||
mogoIntentManager.registerIntentListener(PLAY_VIDEO_AWAKEN, mogoIntentListener);
|
||||
@@ -508,7 +486,7 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
|
||||
// 直接执行相关查询操作
|
||||
Logger.d(TAG, "智慧出行在前台,可直接分享--->");
|
||||
realShare(intentStr, intent);
|
||||
}else{
|
||||
} else {
|
||||
// 需要打开智慧驾驶,然后执行操作
|
||||
Logger.d(TAG, "智慧出行没在前台,需要打开 --->");
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
@@ -522,7 +500,7 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
|
||||
}
|
||||
};
|
||||
|
||||
public void realShare(String intentStr, Intent intent){
|
||||
public void realShare(String intentStr, Intent intent) {
|
||||
String data = intent.getStringExtra("data");
|
||||
Logger.d(TAG, "唤醒 mogoIntentListener intentStr =" + intentStr + ">>data =" + data);
|
||||
VoiceCmdData voiceData = null;
|
||||
@@ -1085,7 +1063,7 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
|
||||
}
|
||||
|
||||
if (!NetworkUtils.isConnected(getContext())) { //没有网络
|
||||
TipToast.shortTip("分享失败,请检查网络",new TipDrawable(getResources().getDrawable(R.drawable.module_tanlu_upload_fail)));
|
||||
TipToast.shortTip("分享失败,请检查网络", new TipDrawable(getResources().getDrawable(R.drawable.module_tanlu_upload_fail)));
|
||||
} else {
|
||||
float bearing = TanluServiceManager.getLocationClient().getLastKnowLocation().getBearing(); //角度
|
||||
Logger.d(TAG, "onMarkerInfo event.type = " + event.type + " >>event.lat = " + event.lat + " >>event.lon = " + event.lon + " >>event.imageUrl =" + event.imageUrl);
|
||||
@@ -1100,7 +1078,7 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
|
||||
String.format(voiceShareSuccessTts, getMathRandom())), null);
|
||||
TipToast.shortTip("分享成功", new TipDrawable(getResources().getDrawable(R.drawable.module_tanlu_upload_success)));
|
||||
|
||||
if(TanluServiceManager.getMogoStatusManager().isMainPageOnResume()) {
|
||||
if (TanluServiceManager.getMogoStatusManager().isMainPageOnResume()) {
|
||||
double lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude();
|
||||
double lon = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude();
|
||||
Log.d(TAG, "onMarkerInfo lat = " + lat + " >>>> lon = " + lon);
|
||||
|
||||
Reference in New Issue
Block a user