new#基于目的地预判的道路事件提醒、路线推荐
This commit is contained in:
@@ -141,6 +141,8 @@ public class V2XMessageEntity<T> implements Serializable {
|
||||
int ALERT_EVENT_UGC_WARNING = 1_009;
|
||||
// 呼叫、请求直播事件
|
||||
int ALERT_VOICE_CALL_FOR_LIVECAR_SHOW = 1_010;
|
||||
// 基于目的地预判的道路事件
|
||||
int ALERT_PREJECTED_ROAD_WARNING = 1_011;
|
||||
// 推送VR消息展示
|
||||
int ALERT_PUSH_VR_SHOW = 2_000;
|
||||
// 自车求助
|
||||
@@ -162,6 +164,7 @@ public class V2XMessageEntity<T> implements Serializable {
|
||||
V2XTypeEnum.ALERT_EVENT_UGC_WARNING,
|
||||
V2XTypeEnum.ALERT_CAR_FOR_HELP,
|
||||
V2XTypeEnum.ALERT_VOICE_CALL_FOR_LIVECAR_SHOW,
|
||||
V2XTypeEnum.ALERT_PREJECTED_ROAD_WARNING,
|
||||
V2XTypeEnum.ALERT_PUSH_VR_SHOW,
|
||||
V2XTypeEnum.ALERT_OBU_EVENT,
|
||||
})
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.mogo.module.common.entity;
|
||||
|
||||
/**
|
||||
* created by wujifei on 2020/12/24 15:33
|
||||
* describe:基于目的地预判的道路事件
|
||||
*/
|
||||
public class V2XPrejectedRoadEventEntity {
|
||||
|
||||
}
|
||||
@@ -146,6 +146,7 @@ public class V2XModuleProvider implements
|
||||
|
||||
// obu数据转发初始化
|
||||
V2XObuManager.getInstance().init(context);
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData();
|
||||
}
|
||||
|
||||
private void initBiz(Context context) {
|
||||
|
||||
@@ -0,0 +1,537 @@
|
||||
package com.mogo.module.v2x.entity.net;
|
||||
|
||||
import com.mogo.commons.data.BaseData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* created by wujifei on 2020/12/24 11:05
|
||||
* describe:于目的地预判的道路事件和违章高发情况的停车推荐 返回数据
|
||||
*/
|
||||
public class V2XRoadDataRes extends BaseData {
|
||||
|
||||
private String detailMsg;
|
||||
private ResultDTO result;
|
||||
|
||||
public String getDetailMsg() {
|
||||
return detailMsg;
|
||||
}
|
||||
|
||||
public void setDetailMsg(String detailMsg) {
|
||||
this.detailMsg = detailMsg;
|
||||
}
|
||||
|
||||
public ResultDTO getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(ResultDTO result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public static class ResultDTO {
|
||||
|
||||
private List<Double> fromPoint;
|
||||
private List<Double> topPoint;
|
||||
private List<PoiDataDTO> poiData;
|
||||
private List<IllegalParkingDataDTO> illegalParkingData;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ResultDTO{" +
|
||||
"fromPoint=" + fromPoint +
|
||||
", topPoint=" + topPoint +
|
||||
", poiData=" + poiData +
|
||||
", illegalParkingData=" + illegalParkingData +
|
||||
'}';
|
||||
}
|
||||
|
||||
public List<Double> getFromPoint() {
|
||||
return fromPoint;
|
||||
}
|
||||
|
||||
public void setFromPoint(List<Double> fromPoint) {
|
||||
this.fromPoint = fromPoint;
|
||||
}
|
||||
|
||||
public List<Double> getTopPoint() {
|
||||
return topPoint;
|
||||
}
|
||||
|
||||
public void setTopPoint(List<Double> topPoint) {
|
||||
this.topPoint = topPoint;
|
||||
}
|
||||
|
||||
public List<PoiDataDTO> getPoiData() {
|
||||
return poiData;
|
||||
}
|
||||
|
||||
public void setPoiData(List<PoiDataDTO> poiData) {
|
||||
this.poiData = poiData;
|
||||
}
|
||||
|
||||
public List<IllegalParkingDataDTO> getIllegalParkingData() {
|
||||
return illegalParkingData;
|
||||
}
|
||||
|
||||
public void setIllegalParkingData(List<IllegalParkingDataDTO> illegalParkingData) {
|
||||
this.illegalParkingData = illegalParkingData;
|
||||
}
|
||||
|
||||
public static class PoiDataDTO {
|
||||
/**
|
||||
* generateTime : 1607061691000
|
||||
* type : 0
|
||||
* lat : 39.988346
|
||||
* lon : 116.410857
|
||||
* direction : 333
|
||||
* items : [{"url":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1603181678357.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1607393278%3B1607400478%26q-key-time%3D1607393278%3B1607400478%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D78c0f738f4dae37e67c235561c78120b86433a04"}]
|
||||
* cityName :
|
||||
* distance : 21447
|
||||
* nickName : 独狼
|
||||
* headImgUrl : https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/VN000015.jpg
|
||||
* sn :
|
||||
* userId : 0
|
||||
* trafficInfoType : 0
|
||||
* infoId : 784423898000445440
|
||||
* poiType : 10015
|
||||
* uploadType : 2
|
||||
* likeNum : 3
|
||||
* systemLikeNum : 3
|
||||
* fabulous : false
|
||||
*/
|
||||
|
||||
|
||||
private long generateTime;
|
||||
|
||||
private int type;
|
||||
private double lat;
|
||||
private double lon;
|
||||
|
||||
private int direction;
|
||||
private String cityName;
|
||||
|
||||
private int distance;
|
||||
private String nickName;
|
||||
|
||||
private String headImgUrl;
|
||||
|
||||
private String sn;
|
||||
|
||||
private int userId;
|
||||
|
||||
private String trafficInfoType;
|
||||
|
||||
private String infoId;
|
||||
|
||||
private String poiType;
|
||||
|
||||
private String uploadType;
|
||||
|
||||
private int likeNum;
|
||||
|
||||
private int systemLikeNum;
|
||||
|
||||
private boolean fabulous;
|
||||
|
||||
private List<ItemsDTO> items;
|
||||
|
||||
public long getGenerateTime() {
|
||||
return generateTime;
|
||||
}
|
||||
|
||||
public void setGenerateTime(long generateTime) {
|
||||
this.generateTime = generateTime;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
public int getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(int direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public String getCityName() {
|
||||
return cityName;
|
||||
}
|
||||
|
||||
public void setCityName(String cityName) {
|
||||
this.cityName = cityName;
|
||||
}
|
||||
|
||||
public int getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(int distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getHeadImgUrl() {
|
||||
return headImgUrl;
|
||||
}
|
||||
|
||||
public void setHeadImgUrl(String headImgUrl) {
|
||||
this.headImgUrl = headImgUrl;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(int userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getTrafficInfoType() {
|
||||
return trafficInfoType;
|
||||
}
|
||||
|
||||
public void setTrafficInfoType(String trafficInfoType) {
|
||||
this.trafficInfoType = trafficInfoType;
|
||||
}
|
||||
|
||||
public String getInfoId() {
|
||||
return infoId;
|
||||
}
|
||||
|
||||
public void setInfoId(String infoId) {
|
||||
this.infoId = infoId;
|
||||
}
|
||||
|
||||
public String getPoiType() {
|
||||
return poiType;
|
||||
}
|
||||
|
||||
public void setPoiType(String poiType) {
|
||||
this.poiType = poiType;
|
||||
}
|
||||
|
||||
public String getUploadType() {
|
||||
return uploadType;
|
||||
}
|
||||
|
||||
public void setUploadType(String uploadType) {
|
||||
this.uploadType = uploadType;
|
||||
}
|
||||
|
||||
public int getLikeNum() {
|
||||
return likeNum;
|
||||
}
|
||||
|
||||
public void setLikeNum(int likeNum) {
|
||||
this.likeNum = likeNum;
|
||||
}
|
||||
|
||||
public int getSystemLikeNum() {
|
||||
return systemLikeNum;
|
||||
}
|
||||
|
||||
public void setSystemLikeNum(int systemLikeNum) {
|
||||
this.systemLikeNum = systemLikeNum;
|
||||
}
|
||||
|
||||
public boolean isFabulous() {
|
||||
return fabulous;
|
||||
}
|
||||
|
||||
public void setFabulous(boolean fabulous) {
|
||||
this.fabulous = fabulous;
|
||||
}
|
||||
|
||||
public List<ItemsDTO> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
public void setItems(List<ItemsDTO> items) {
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
|
||||
public static class ItemsDTO {
|
||||
/**
|
||||
* url : http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1603181678357.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1607393278%3B1607400478%26q-key-time%3D1607393278%3B1607400478%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D78c0f738f4dae37e67c235561c78120b86433a04
|
||||
*/
|
||||
|
||||
|
||||
private String url;
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class IllegalParkingDataDTO {
|
||||
/**
|
||||
* generateTime : 1594047156488
|
||||
* type : 3
|
||||
* lat : 40.028599
|
||||
* lon : 116.412712
|
||||
* direction : 0
|
||||
* addr : 红军营南路红军营南路万科星园北口至红军营南路北苑路口段
|
||||
* items : []
|
||||
* cityName :
|
||||
* distance : 6728
|
||||
* nickName :
|
||||
* headImgUrl :
|
||||
* sn :
|
||||
* userId : 0
|
||||
* trafficInfoType : 0
|
||||
* infoId : 686267
|
||||
* poiType : 10016
|
||||
* uploadType : 3
|
||||
* likeNum : 0
|
||||
* systemLikeNum : 0
|
||||
* fabulous : false
|
||||
*/
|
||||
|
||||
|
||||
private long generateTime;
|
||||
|
||||
private int type;
|
||||
|
||||
private double lat;
|
||||
|
||||
private double lon;
|
||||
|
||||
private int direction;
|
||||
|
||||
private String addr;
|
||||
|
||||
private String cityName;
|
||||
|
||||
private int distance;
|
||||
|
||||
private String nickName;
|
||||
|
||||
private String headImgUrl;
|
||||
|
||||
private String sn;
|
||||
|
||||
private int userId;
|
||||
|
||||
private String trafficInfoType;
|
||||
|
||||
private String infoId;
|
||||
|
||||
private String poiType;
|
||||
|
||||
private String uploadType;
|
||||
|
||||
private int likeNum;
|
||||
|
||||
private int systemLikeNum;
|
||||
|
||||
private boolean fabulous;
|
||||
|
||||
private List<?> items;
|
||||
|
||||
public long getGenerateTime() {
|
||||
return generateTime;
|
||||
}
|
||||
|
||||
public void setGenerateTime(long generateTime) {
|
||||
this.generateTime = generateTime;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
public int getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(int direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public String getAddr() {
|
||||
return addr;
|
||||
}
|
||||
|
||||
public void setAddr(String addr) {
|
||||
this.addr = addr;
|
||||
}
|
||||
|
||||
public String getCityName() {
|
||||
return cityName;
|
||||
}
|
||||
|
||||
public void setCityName(String cityName) {
|
||||
this.cityName = cityName;
|
||||
}
|
||||
|
||||
public int getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(int distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getHeadImgUrl() {
|
||||
return headImgUrl;
|
||||
}
|
||||
|
||||
public void setHeadImgUrl(String headImgUrl) {
|
||||
this.headImgUrl = headImgUrl;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(int userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getTrafficInfoType() {
|
||||
return trafficInfoType;
|
||||
}
|
||||
|
||||
public void setTrafficInfoType(String trafficInfoType) {
|
||||
this.trafficInfoType = trafficInfoType;
|
||||
}
|
||||
|
||||
public String getInfoId() {
|
||||
return infoId;
|
||||
}
|
||||
|
||||
public void setInfoId(String infoId) {
|
||||
this.infoId = infoId;
|
||||
}
|
||||
|
||||
public String getPoiType() {
|
||||
return poiType;
|
||||
}
|
||||
|
||||
public void setPoiType(String poiType) {
|
||||
this.poiType = poiType;
|
||||
}
|
||||
|
||||
public String getUploadType() {
|
||||
return uploadType;
|
||||
}
|
||||
|
||||
public void setUploadType(String uploadType) {
|
||||
this.uploadType = uploadType;
|
||||
}
|
||||
|
||||
public int getLikeNum() {
|
||||
return likeNum;
|
||||
}
|
||||
|
||||
public void setLikeNum(int likeNum) {
|
||||
this.likeNum = likeNum;
|
||||
}
|
||||
|
||||
public int getSystemLikeNum() {
|
||||
return systemLikeNum;
|
||||
}
|
||||
|
||||
public void setSystemLikeNum(int systemLikeNum) {
|
||||
this.systemLikeNum = systemLikeNum;
|
||||
}
|
||||
|
||||
public boolean isFabulous() {
|
||||
return fabulous;
|
||||
}
|
||||
|
||||
public void setFabulous(boolean fabulous) {
|
||||
this.fabulous = fabulous;
|
||||
}
|
||||
|
||||
public List<?> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
public void setItems(List<?> items) {
|
||||
this.items = items;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import com.mogo.module.v2x.entity.net.V2XDemoUserInfoRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XLiveCarRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XLiveCrossRoad;
|
||||
import com.mogo.module.v2x.entity.net.V2XLivePushVoRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XRoadDataRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XSeekHelpRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XStrategyPushRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XUserInfoRes;
|
||||
@@ -24,6 +25,7 @@ import retrofit2.http.GET;
|
||||
import retrofit2.http.Headers;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
import retrofit2.http.QueryMap;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -171,5 +173,12 @@ public interface V2XApiService {
|
||||
@FormUrlEncoded
|
||||
@POST("/yycp-geo-fence-carService/car/camera/no/nextTest/v1")
|
||||
// @POST("/yycp-geo-fence-carService/car/camera/no/next/v1")
|
||||
Observable<V2XLiveCrossRoad> queryCrossRoadsLive(@FieldMap Map<String, Object> parameters);
|
||||
Observable<V2XLiveCrossRoad> queryCrossRoadsLive(@FieldMap Map<String, Object> params);
|
||||
|
||||
|
||||
/**
|
||||
* 基于目的地预判的道路事件和违章高发情况的停车推荐
|
||||
*/
|
||||
@GET("/yycp-geo-fence-carService/car/road/getRoadDataOfVehiclesRecommend")
|
||||
Observable<V2XRoadDataRes> queryRoadDataOfVehiclesRecommend(@QueryMap Map<String, Object> parameters);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.mogo.module.v2x.network;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.data.BaseData;
|
||||
@@ -12,18 +15,25 @@ import com.mogo.commons.network.Utils;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.module.common.entity.MarkerResponse;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XPrejectedRoadEventEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.module.service.network.RefreshBody;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.alarm.V2XAlarmServer;
|
||||
import com.mogo.module.v2x.entity.net.V2XDemoUserInfoRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XLiveCarBroadcastReq;
|
||||
import com.mogo.module.v2x.entity.net.V2XLiveCarRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XLiveCrossRoad;
|
||||
import com.mogo.module.v2x.entity.net.V2XLivePushVoRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XRoadDataRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XSeekHelpRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XStrategyPushRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XUserInfoRes;
|
||||
import com.mogo.module.v2x.utils.TimeUtils;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -32,10 +42,15 @@ import com.mogo.utils.network.utils.GsonUtil;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.annotations.NonNull;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
|
||||
|
||||
|
||||
/**
|
||||
* 数据接口API
|
||||
@@ -655,4 +670,46 @@ public class V2XRefreshModel {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void queryRoadData() {
|
||||
if (mV2XApiService != null) {
|
||||
Map<String, Object> map = new ParamsProvider.Builder(mContext).build();
|
||||
map.put("sn", Utils.getSn());
|
||||
mV2XApiService.queryRoadDataOfVehiclesRecommend(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<V2XRoadDataRes>(RequestOptions.create(mContext)) {
|
||||
|
||||
@Override
|
||||
public void onNext(V2XRoadDataRes v2XRoadDataRes) {
|
||||
super.onNext(v2XRoadDataRes);
|
||||
Logger.d("queryRoadData:onSuccess", v2XRoadDataRes.toString());
|
||||
if (v2XRoadDataRes == null || v2XRoadDataRes.getResult() == null) {
|
||||
return;
|
||||
}
|
||||
if (v2XRoadDataRes.getResult().getPoiData() != null && v2XRoadDataRes.getResult().getPoiData().size() > 0) {
|
||||
V2XPrejectedRoadEventEntity v2XPrejectedRoadEventEntity = new V2XPrejectedRoadEventEntity();
|
||||
V2XMessageEntity<V2XPrejectedRoadEventEntity> v2xMessageEntity = new V2XMessageEntity<>();
|
||||
// 控制类型
|
||||
v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_PREJECTED_ROAD_WARNING);
|
||||
// 设置数据
|
||||
v2xMessageEntity.setContent(v2XPrejectedRoadEventEntity);
|
||||
// 控制展示状态
|
||||
v2xMessageEntity.setShowState(true);
|
||||
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2xMessageEntity);
|
||||
LocalBroadcastManager.getInstance(V2XUtils.getApp()).sendBroadcast(intent);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
Logger.d("queryRoadData:onError", e.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.scenario.IV2XScenarioManager;
|
||||
import com.mogo.module.v2x.scenario.scene.animation.V2XAnimationScenario;
|
||||
import com.mogo.module.v2x.scenario.scene.destination.V2XPrejectedRoadEventScenario;
|
||||
import com.mogo.module.v2x.scenario.scene.fatigue.V2XFatigueDrivingScenario;
|
||||
import com.mogo.module.v2x.scenario.scene.help.V2XCarForHelpScenario;
|
||||
import com.mogo.module.v2x.scenario.scene.livecar.V2XPushLiveCarScenario;
|
||||
@@ -96,6 +97,9 @@ public class V2XScenarioManager implements IV2XScenarioManager {
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_VOICE_CALL_FOR_LIVECAR_SHOW:
|
||||
mV2XScenario = new V2XVoiceCallLiveScenario();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_PREJECTED_ROAD_WARNING:
|
||||
mV2XScenario = new V2XPrejectedRoadEventScenario();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_VR_SHOW:
|
||||
mV2XScenario = new V2XPushVREventScenario();
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.mogo.module.v2x.scenario.scene.destination;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XPrejectedRoadEventEntity;
|
||||
import com.mogo.module.v2x.scenario.impl.AbsV2XScenario;
|
||||
|
||||
/**
|
||||
* created by wujifei on 2020/12/24 15:45
|
||||
* describe:基于目的地预判的道路事件场景
|
||||
*/
|
||||
public class V2XPrejectedRoadEventScenario extends AbsV2XScenario<V2XPrejectedRoadEventEntity> {
|
||||
|
||||
@Override
|
||||
public void init(@Nullable V2XMessageEntity<V2XPrejectedRoadEventEntity> v2XMessageEntity) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showWindow() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeWindow() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showButton() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeButton() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPOI() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearPOI() {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user