changed the getSn and visual func
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package com.mogo.module.authorize.authprovider.launcher
|
||||
|
||||
import com.google.gson.Gson
|
||||
import com.mogo.commons.network.Utils.getSn
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.module.authorize.model.BaseResponse
|
||||
import com.mogo.module.authorize.model.IMogoAuthorizeModel
|
||||
import com.mogo.module.authorize.model.bean.UpdateAuthorize
|
||||
@@ -10,7 +10,7 @@ class MogoAuthorizeMainModel : IMogoAuthorizeModel() {
|
||||
|
||||
suspend fun updateAuthorize(agrId: Long, agreementStatus: Int): BaseResponse<Any> {
|
||||
val updateAuthorize = Gson().toJson(UpdateAuthorize(agrId, agreementStatus))
|
||||
val map = mapOf("sn" to getSn(), "data" to updateAuthorize)
|
||||
val map = mapOf("sn" to MoGoAiCloudClientConfig.getInstance().sn, "data" to updateAuthorize)
|
||||
return apiCall { getNetWorkApi().updateAuthorize(map) }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.mogo.module.authorize.model
|
||||
|
||||
import com.google.gson.Gson
|
||||
import com.mogo.commons.network.Utils.getSn
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.module.authorize.model.bean.AgreementData
|
||||
import com.mogo.module.authorize.model.bean.AgreementStatus
|
||||
import com.mogo.module.authorize.model.bean.RequestUserAgreement
|
||||
@@ -14,13 +14,13 @@ open class IMogoAuthorizeModel : BaseRepository() {
|
||||
|
||||
suspend fun invokeAuthorizeContent(agreementType: Int, needContent: Boolean = false): BaseResponse<AgreementData> {
|
||||
val requestUserAgreement = Gson().toJson(RequestUserAgreement(agreementType, needContent))
|
||||
val map = mapOf("sn" to getSn(), "data" to requestUserAgreement)
|
||||
val map = mapOf("sn" to MoGoAiCloudClientConfig.getInstance().sn, "data" to requestUserAgreement)
|
||||
return apiCall { getNetWorkApi().getAuthorizeContent(map) }
|
||||
}
|
||||
|
||||
suspend fun invokeIfNeedAuthorize(agreementType: Int): BaseResponse<AgreementStatus> {
|
||||
val requestUserAgreement = Gson().toJson(RequestUserAgreement(agreementType))
|
||||
val map = mapOf("sn" to getSn(), "data" to requestUserAgreement)
|
||||
val map = mapOf("sn" to MoGoAiCloudClientConfig.getInstance().sn, "data" to requestUserAgreement)
|
||||
return apiCall { getNetWorkApi().checkIfNeedAuthorize(map) }
|
||||
}
|
||||
}
|
||||
@@ -1371,11 +1371,11 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
if (MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().getCurrentMapVisualAngle().isLongSight()) {
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi()
|
||||
.getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT);
|
||||
.getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT,null);
|
||||
} else if (MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(AbsMogoApplication.getApp()).inVisibleAllMarkers();
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi()
|
||||
.getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT);
|
||||
.getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT,null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.commons.network.Utils;
|
||||
@@ -134,7 +135,7 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
|
||||
|
||||
public void getCommonConfig() {
|
||||
Map<String, Object> params = new ArrayMap<>();
|
||||
params.put("sn", Utils.getSn());
|
||||
params.put("sn", MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
mNetWork.create(GetConfigApiServices.class, HostConst.DATA_SERVICE_HOST)
|
||||
.getConfig(params)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -184,7 +185,7 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
|
||||
|
||||
public void requestUserInfo() {
|
||||
Map<String, String> params = new ArrayMap<>();
|
||||
params.put("sn", Utils.getSn());
|
||||
params.put("sn", MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
params.put("source", "2");
|
||||
String sign = createSign(params, "JGqZw9");
|
||||
params.put("sig", sign);
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.os.SystemClock;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.data.BaseData;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
import com.mogo.commons.network.Utils;
|
||||
@@ -118,7 +119,7 @@ public class DelayCheckUtil implements Handler.Callback {
|
||||
}
|
||||
Logger.d(TAG, "lastLocation: " + lastLocation);
|
||||
DelayCheckUploadRequest request = new DelayCheckUploadRequest();
|
||||
request.setSn(Utils.getSn());
|
||||
request.setSn(MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
request.setStartTime(requestStartSystemTime);
|
||||
request.setEndTime(requestEndSystem);
|
||||
request.setNetState(NetworkUtils.netStrengthLevel);
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.network.ParamsProvider;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
@@ -404,7 +405,7 @@ class LauncherCardRefresher {
|
||||
.addType( LauncherCardRefreshType.News.getVal() )
|
||||
.addType( LauncherCardRefreshType.ExplorerWay.getVal() )
|
||||
.addType( LauncherCardRefreshType.Weather.getVal() )
|
||||
.sn( Utils.getSn() )
|
||||
.sn( MoGoAiCloudClientConfig.getInstance().getSn() )
|
||||
.cityCode( location.getCityCode() )
|
||||
.cityName( location.getCityName() )
|
||||
.location( new MogoLatLng( location.getLatitude(), location.getLongitude() ) );
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.module.service.network;
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.data.BaseData;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.network.ParamsProvider;
|
||||
@@ -158,7 +159,7 @@ public class RefreshModel {
|
||||
if ( mRefreshApiService != null ) {
|
||||
final Map< String, Object > query = new ParamsProvider.Builder( mContext ).build();
|
||||
final RefreshBody refreshBody = new RefreshBody();
|
||||
refreshBody.sn = Utils.getSn();
|
||||
refreshBody.sn = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
if ( limit > 0 ) {
|
||||
refreshBody.limit = limit;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.os.Message;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.cloud.socket.entity.SocketDownData;
|
||||
import com.mogo.commons.data.BaseData;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
@@ -150,7 +151,7 @@ public class TimeDelayUploadManager implements IMogoOnMessageListener<MockSocket
|
||||
}
|
||||
MockSocketSendData mockSocketSendData = new MockSocketSendData(System.currentTimeMillis(), result.getUuid(), result.getSatelliteTime());
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("sn", Utils.getSn());
|
||||
map.put("sn", MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
map.put("data", GsonUtil.jsonFromObject(mockSocketSendData));
|
||||
Logger.d(TAG, "mockSocketSendData : " + GsonUtil.jsonFromObject(mockSocketSendData));
|
||||
Logger.d(TAG, "data uuid : " + result.getUuid() + " duration : " + (System.currentTimeMillis() - result.getSatelliteTime()));
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.util.ArrayMap;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
import com.mogo.commons.network.Utils;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
@@ -456,7 +457,7 @@ public class ShareControl implements IMogoShareManager, Handler.Callback {
|
||||
if (NetworkUtils.isConnected(mContext) && location != null && !location.getAdCode().isEmpty()) {
|
||||
// 有网,且有adcode,直接请求
|
||||
Map<String, String> params = new ArrayMap<>();
|
||||
ShareConfigRequest request = new ShareConfigRequest(Utils.getSn(),
|
||||
ShareConfigRequest request = new ShareConfigRequest(MoGoAiCloudClientConfig.getInstance().getSn(),
|
||||
location.getAdCode());
|
||||
params.put("data", request.toJson());
|
||||
ServiceApisManager.serviceApis.getNetworkApi().create(ShareDevaApiService.class,
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.SystemClock
|
||||
import android.util.ArrayMap
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.analytics.AnalyticsUtils
|
||||
import com.mogo.commons.data.BaseData
|
||||
import com.mogo.commons.network.SubscribeImpl
|
||||
@@ -157,7 +158,7 @@ object SeekHelpManager {
|
||||
private fun realSeekHelp(from:String) {
|
||||
Logger.d(TAG, "realSeekHelp")
|
||||
// 请求故障求助接口
|
||||
val seekRequest = SeekRequest(Utils.getSn())
|
||||
val seekRequest = SeekRequest(MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
val param = mutableMapOf("data" to seekRequest.getJson())
|
||||
|
||||
val properties: MutableMap<String, Any> = ArrayMap()
|
||||
@@ -221,7 +222,7 @@ object SeekHelpManager {
|
||||
}
|
||||
|
||||
fun debugCancelSeek() {
|
||||
val seekRequest = SeekRequest(Utils.getSn(), 0)
|
||||
val seekRequest = SeekRequest(MoGoAiCloudClientConfig.getInstance().getSn(), 0)
|
||||
val param = mutableMapOf("data" to seekRequest.getJson())
|
||||
ServiceApisManager.serviceApis.networkApi.create(ShareRtlApiService::class.java, HostConst.REALTIME_LOCATION_HOST).sendHelpSignal(param).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(object : SubscribeImpl<BaseData>(RequestOptions.create(context)) {
|
||||
override fun onSuccess(o: BaseData?) {
|
||||
|
||||
@@ -132,7 +132,7 @@ public class TanluModelData {
|
||||
// }
|
||||
//
|
||||
// Map<String, Object> params = new ParamsProvider.Builder(mContext)
|
||||
// .append("sn", Utils.getSn())
|
||||
// .append("sn", MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
// .append("data", GsonUtil.jsonFromObject(request))
|
||||
// .build();
|
||||
//
|
||||
@@ -194,7 +194,7 @@ public class TanluModelData {
|
||||
// }
|
||||
//
|
||||
// Map<String, Object> params = new ParamsProvider.Builder(mContext)
|
||||
// .append("sn", Utils.getSn())
|
||||
// .append("sn", MoGoAiCloudClientConfig.getInstance().getSn()))
|
||||
// .append("data", GsonUtil.jsonFromObject(request))
|
||||
// .build();
|
||||
// return mShareApiService.queryRoadInfos(params);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.module.share.net;
|
||||
|
||||
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;
|
||||
@@ -43,7 +44,7 @@ public class TrafficModelData {
|
||||
|
||||
final ParamsProvider.Builder builder = new ParamsProvider.Builder( getApp().getApplicationContext());
|
||||
Map<String, Object> parameters = builder.build();
|
||||
parameters.put("sn", Utils.getSn());
|
||||
parameters.put("sn", MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
parameters.put("data",GsonUtil.jsonFromObject(uploadTrafficEntity));
|
||||
mTrafficApiService.UploadCongestionInfo(parameters)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -248,7 +248,7 @@ class BlockStrategy(private val context: Context, private val apis: IMogoService
|
||||
// val params = ArrayMap<String, Any>()
|
||||
// params["speed"] = average.toInt()
|
||||
// val body = RequestBody.create(MediaType.parse("Content-type:application/json;charset=UTF-8"), GsonUtil.jsonFromObject(params))
|
||||
// apis.networkApi.create(ShareApiService::class.java, HttpConstant.getNetHost()).sendAverageSpeedForBlockStrategy(body, Utils.getSn()).subscribeOn(Schedulers.io()).subscribe(object : SubscribeImpl<AverateSpeedResponse>(RequestOptions.create(context)) {
|
||||
// apis.networkApi.create(ShareApiService::class.java, HttpConstant.getNetHost()).sendAverageSpeedForBlockStrategy(body, MoGoAiCloudClientConfig.getInstance().getSn()).subscribeOn(Schedulers.io()).subscribe(object : SubscribeImpl<AverateSpeedResponse>(RequestOptions.create(context)) {
|
||||
// override fun onSuccess(response: AverateSpeedResponse?) {
|
||||
// super.onSuccess(response)
|
||||
// response?.let {
|
||||
|
||||
@@ -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