changed the getSn and visual func
This commit is contained in:
@@ -14,6 +14,7 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.network.Utils;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
@@ -149,7 +150,7 @@ public class V2XModuleProvider implements
|
||||
// obu数据转发初始化
|
||||
V2XObuManager.getInstance().init(context);
|
||||
if (V2XServiceManager.getMoGoStatusManager().isTopContainerReady()) {
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData(Utils.getSn());
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData(MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -334,7 +335,7 @@ public class V2XModuleProvider implements
|
||||
FatigueDrivingUtils.refreshAccOnTime();
|
||||
initCarForHelpStatus();
|
||||
if (V2XServiceManager.getMoGoStatusManager().isTopContainerReady()) {
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData(Utils.getSn());
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData(MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
}
|
||||
} else {
|
||||
// 记录关机时间
|
||||
@@ -345,7 +346,7 @@ public class V2XModuleProvider implements
|
||||
refreshMeSeekHelp(isTrue);
|
||||
}else if (descriptor == StatusDescriptor.TOP_CONTAINER_READY) {
|
||||
if (isTrue) {
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData(Utils.getSn());
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData(MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.text.TextUtils;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.data.BaseData;
|
||||
import com.mogo.commons.network.ParamsProvider;
|
||||
@@ -357,7 +358,7 @@ public class V2XRefreshModel {
|
||||
final Map<String, Object> map = new ParamsProvider.Builder(mContext).build();
|
||||
String json = new StringBuilder()
|
||||
.append("{")
|
||||
.append("\"sn\":").append(Utils.getSn())
|
||||
.append("\"sn\":").append(MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
.append(",")
|
||||
.append("\"vehicleType\":")
|
||||
.append(0)
|
||||
@@ -394,7 +395,7 @@ public class V2XRefreshModel {
|
||||
*/
|
||||
public void getHelpSignal(V2XRefreshCallback<V2XSeekHelpRes> callback) {
|
||||
final Map<String, Object> map = new ParamsProvider.Builder(mContext).build();
|
||||
map.put("sn", Utils.getSn());
|
||||
map.put("sn", MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
V2XApiServiceFactory.getRealtimeLocationApiService(mContext).queryHelpSignal(map).subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<V2XSeekHelpRes>(RequestOptions.create(mContext)) {
|
||||
@@ -525,7 +526,7 @@ public class V2XRefreshModel {
|
||||
.append(",")
|
||||
.append("\"likeOrdislike\":").append(likeOrDislike)
|
||||
.append(",")
|
||||
.append("\"sn\":").append(Utils.getSn())
|
||||
.append("\"sn\":").append(MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
.append("}").toString();
|
||||
map.put("data", json);
|
||||
V2XApiServiceFactory.getDevaApiService(mContext).addPoiInfoFabulous(map).subscribeOn(Schedulers.io())
|
||||
@@ -563,7 +564,7 @@ public class V2XRefreshModel {
|
||||
.append("{")
|
||||
.append("\"seekHelpSn\":").append(seekHelpSn)
|
||||
.append(",")
|
||||
.append("\"enthusiasticSn\":").append(Utils.getSn())
|
||||
.append("\"enthusiasticSn\":").append(MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
.append("}").toString();
|
||||
map.put("data", json);
|
||||
V2XApiServiceFactory.getDevaApiService(mContext).respondingToHelp(map).subscribeOn(Schedulers.io())
|
||||
@@ -591,7 +592,7 @@ public class V2XRefreshModel {
|
||||
int status,
|
||||
String helpId) {
|
||||
final Map<String, Object> map = new ParamsProvider.Builder(mContext).build();
|
||||
String json = "{" + "\"id\":\"" + id + "\"," + "\"sn\":\"" + Utils.getSn() + "\"," + "\"status\":" + status + "," + "\"helpId\":\"" + helpId + "\"}";
|
||||
String json = "{" + "\"id\":\"" + id + "\"," + "\"sn\":\"" + MoGoAiCloudClientConfig.getInstance().getSn() + "\"," + "\"status\":" + status + "," + "\"helpId\":\"" + helpId + "\"}";
|
||||
map.put("data", json);
|
||||
V2XApiServiceFactory.getDevaApiService(mContext).manualMarkingTrafficJam(map).subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -617,7 +618,7 @@ public class V2XRefreshModel {
|
||||
String tmpLon = String.valueOf(lon);
|
||||
float bearing = lastKnowLocation.getBearing();
|
||||
String json = "{\"lat\":" + tmpLat + ",\"lon\":" + tmpLon + ",\"direction\":" + bearing + "}";
|
||||
map.put("sn", Utils.getSn());
|
||||
map.put("sn", MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
map.put("data", json);
|
||||
V2XApiServiceFactory.getGeoFenceCarServiceApiService(mContext).queryCrossRoadsLive(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.module.v2x.network;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.data.BaseData;
|
||||
import com.mogo.commons.network.ParamsProvider;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
@@ -99,7 +100,7 @@ public class V2XShareNetworkModel {
|
||||
public void getShareIndex(V2XRefreshCallback callback) {
|
||||
final ParamsProvider.Builder builder = new ParamsProvider.Builder(mContext);
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("sn", Utils.getSn());
|
||||
hashMap.put("sn", MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
builder.append("data", GsonUtil.jsonFromObject(hashMap));
|
||||
Map<String, Object> parameters = builder.build();
|
||||
//热心指数
|
||||
@@ -141,7 +142,7 @@ public class V2XShareNetworkModel {
|
||||
|
||||
final ParamsProvider.Builder builder = new ParamsProvider.Builder(mContext);
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("sn", Utils.getSn());
|
||||
hashMap.put("sn", MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
hashMap.put("pageNum", page);
|
||||
hashMap.put("pageSize", size);
|
||||
builder.append("data", GsonUtil.jsonFromObject(hashMap));
|
||||
|
||||
@@ -8,6 +8,7 @@ import androidx.lifecycle.Lifecycle;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
import com.mogo.commons.network.Utils;
|
||||
@@ -63,7 +64,7 @@ public class SurroundingEventPresenter extends Presenter<SurroundingEventView> {
|
||||
String[] poiTypes = {"10002", "10003", "10006", "10007", "10008", "10010", "10011", "10013", "10015"};
|
||||
SurroundingRequest request = new SurroundingRequest(center, poiTypes, 5, 300);
|
||||
|
||||
V2XApiServiceFactory.getDevaApiService(mContext).getSurroundingEventList(Utils.getSn(), convert(GsonUtil.jsonFromObject(request)))
|
||||
V2XApiServiceFactory.getDevaApiService(mContext).getSurroundingEventList(MoGoAiCloudClientConfig.getInstance().getSn(), convert(GsonUtil.jsonFromObject(request)))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<SurroundingResponse>(RequestOptions.create(getContext())) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.content.Intent;
|
||||
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
@@ -160,14 +161,7 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
|
||||
} else if (sceneType == 18) { //test visualAngle UI
|
||||
V2XServiceManager.getMapService().getMarkerManager(mContext).inVisibleAllMarkers();
|
||||
V2XServiceManager.getMapService().getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT);
|
||||
} else if (sceneType == 19) { //test visualAngle UI
|
||||
V2XServiceManager.getMapService().getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT);
|
||||
} else if (sceneType == 20) { //test visualAngle UI
|
||||
V2XServiceManager.getMapService().getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_CLOSE_SIGHT);
|
||||
} else if (sceneType == 21) {// 自车求助
|
||||
} else if (sceneType == 18) {// 自车求助
|
||||
V2XMessageEntity<Boolean> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarioCarForHelpEventData();
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
|
||||
@@ -148,7 +148,7 @@ public class V2XScenarioManager implements IV2XScenarioManager {
|
||||
private void sceneChange() {
|
||||
if (MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().
|
||||
getCurrentMapVisualAngle() != VisualAngleMode.MODE_MEDIUM_SIGHT) {
|
||||
V2XServiceManager.getMapService().getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT);
|
||||
V2XServiceManager.getMapService().getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT,null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import static com.mogo.service.statusmanager.StatusDescriptor.MAIN_PAGE_RESUME;
|
||||
* author : unknown
|
||||
* desc : 语音呼叫查看直播车辆 或者 路口实况 业务模块
|
||||
*/
|
||||
public class V2XVoiceCallLiveBiz implements IMogoMarkerClickListener{
|
||||
public class V2XVoiceCallLiveBiz implements IMogoMarkerClickListener {
|
||||
|
||||
private static final String REGISTER_LIFECYCLE_TAG = "V2XVoiceCallLiveBiz";
|
||||
|
||||
@@ -88,22 +88,23 @@ public class V2XVoiceCallLiveBiz implements IMogoMarkerClickListener{
|
||||
|
||||
/**
|
||||
* 地图上静态marker点击,现在仅点击摄像头
|
||||
*
|
||||
* @param marker
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean onStaticMarkerClicked(IMogoMarker marker) {
|
||||
Log.d(REGISTER_LIFECYCLE_TAG,"onStaticMarkerClicked marker");
|
||||
if(V2XServiceManager.getMapService().getMapUIController().getCurrentMapVisualAngle().isLongSight()){
|
||||
Log.d(REGISTER_LIFECYCLE_TAG,"onStaticMarkerClicked marker is on LongSight, so don't response");
|
||||
Log.d(REGISTER_LIFECYCLE_TAG, "onStaticMarkerClicked marker");
|
||||
if (V2XServiceManager.getMapService().getMapUIController().getCurrentMapVisualAngle().isLongSight()) {
|
||||
Log.d(REGISTER_LIFECYCLE_TAG, "onStaticMarkerClicked marker is on LongSight, so don't response");
|
||||
return false;
|
||||
}
|
||||
//拉近地图视角为近景
|
||||
V2XServiceManager.getMapService().getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_CLOSE_SIGHT);
|
||||
V2XServiceManager.getMapService().getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_CLOSE_SIGHT, marker.getPosition());
|
||||
//移动地图中心点至marker位置
|
||||
V2XServiceManager.getMapService().getMapUIController().moveToCenter(marker.getPosition(),true);
|
||||
V2XServiceManager.getMapService().getMapUIController().moveToCenter(marker.getPosition(), true);
|
||||
String assInfo = marker.getMarkerAssInfo();
|
||||
Log.d(REGISTER_LIFECYCLE_TAG,"onStaticMarkerClicked marker assInfo : " + assInfo);
|
||||
Log.d(REGISTER_LIFECYCLE_TAG, "onStaticMarkerClicked marker assInfo : " + assInfo);
|
||||
if (TextUtils.isEmpty(assInfo) || !assInfo.contains(MAP_STATIC_TRAFFIC)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -177,6 +178,7 @@ public class V2XVoiceCallLiveBiz implements IMogoMarkerClickListener{
|
||||
|
||||
/**
|
||||
* 获取特定路口摄像头直播
|
||||
*
|
||||
* @param assInfo 路口摄像头Id
|
||||
*/
|
||||
private void getSpecifiedOpenCameraLive(String assInfo) {
|
||||
@@ -221,7 +223,7 @@ public class V2XVoiceCallLiveBiz implements IMogoMarkerClickListener{
|
||||
return v2XMessageEntity;
|
||||
}
|
||||
|
||||
public void onDestroy(){
|
||||
public void onDestroy() {
|
||||
MogoApisHandler.getInstance().getApis().getRegisterCenterApi().unregisterMogoStaticMarkerClickListener(MAP_STATIC, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.module.v2x.utils;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.network.Utils;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.MarkerUserInfo;
|
||||
@@ -65,7 +66,7 @@ public class ChartingUtil {
|
||||
*/
|
||||
public static void isOnLine(String sn, ChartStatusListener chartStatusListener) {
|
||||
try {
|
||||
String isMe = Utils.getSn();
|
||||
String isMe = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
if (isMe.equals(sn)) {
|
||||
Logger.d("", "是我的分享");
|
||||
if (chartStatusListener != null) {
|
||||
|
||||
Reference in New Issue
Block a user