update aiCloudSdkVersion

This commit is contained in:
zhongchao
2021-05-26 20:38:14 +08:00
parent 262c5b4fab
commit e47a344640
3 changed files with 27 additions and 20 deletions

View File

@@ -12,6 +12,7 @@ import com.bytedance.boost_multidex.BoostMultiDex;
import com.mogo.cloud.httpdns.MogoHttpDnsConfig;
import com.mogo.cloud.httpdns.bean.HttpDnsSimpleLocation;
import com.mogo.cloud.httpdns.listener.IHttpDnsCurrentLocation;
import com.mogo.cloud.passport.IMoGoTokenCallback;
import com.mogo.cloud.passport.MoGoAiCloudClient;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.commons.AbsMogoApplication;
@@ -180,8 +181,7 @@ public class MogoApplication extends AbsMogoApplication {
@Override
protected void init() {
super.init();
final IMogoServiceApis apis = MogoApisHandler.getInstance().getApis();
prepareBaseService(apis, 0L);
prepareBaseService();
}
@Override
@@ -197,15 +197,9 @@ public class MogoApplication extends AbsMogoApplication {
/**
* 基础服务passport、location、socket
*/
private void prepareBaseService(IMogoServiceApis apis, long delay) {
private void prepareBaseService() {
// 第三方平台的sn是由AI云SDK中服务调用通过服务端生成的
preparePassportEnvironment();
prepareSocketAndLocationServices(apis);
//无延迟
// UiThreadHandler.postDelayed(() -> {
//
// }, delay);
}
private void preparePassportEnvironment() {
@@ -275,11 +269,25 @@ public class MogoApplication extends AbsMogoApplication {
});
// 初始化SDK可以设置状态回调来监听
MoGoAiCloudClient.getInstance().init(this, clientConfig);
MoGoAiCloudClient.getInstance().init(this, clientConfig).addTokenCallbacks(
new IMoGoTokenCallback() {
@Override
public void onTokenGot(String token, String sn) {
// 鉴权成功后开启socket长链服务
prepareSocketAndLocationServices();
}
@Override
public void onError(int code, String msg) {
}
}
);
}
private void prepareSocketAndLocationServices(IMogoServiceApis apis) {
private void prepareSocketAndLocationServices() {
//开启Socket长链服务
IMogoServiceApis apis = MogoApisHandler.getInstance().getApis();
apis.getSocketManagerApi(getApplicationContext()).init(getApplicationContext(), DebugConfig.getSocketAppId());
if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) {
apis.getLocationInfoApi().start();

View File

@@ -157,19 +157,19 @@ LOGLIB_VERSION = 1.0.4
######## MogoAiCloudSDK Version
# 网络请求
MOGO_NETWORK_VERSION=1.1.8
MOGO_NETWORK_VERSION=1.1.9
# 鉴权
MOGO_PASSPORT_VERSION=1.1.8
MOGO_PASSPORT_VERSION=1.1.9
# 常链接
MOGO_SOCKET_VERSION=1.1.8
MOGO_SOCKET_VERSION=1.1.9
# 数据采集
MOGO_REALTIME_VERSION=1.1.8
MOGO_REALTIME_VERSION=1.1.9
# 探路,道路事件发布,获取
MOGO_TANLU_VERSION=1.1.8
MOGO_TANLU_VERSION=1.1.9
# 直播推流
MOGO_LIVE_VERSION=1.1.8
MOGO_LIVE_VERSION=1.1.9
# 直播拉流
MOGO_TRAFFICLIVE_VERSION=1.1.8
MOGO_TRAFFICLIVE_VERSION=1.1.9
#ADAS HIGHT
MOGO_ADASHIGH_VERSION = '1.1.3'

View File

@@ -148,11 +148,10 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
@Override
public void onMsgReceived(SocketDownData.LauncherSnapshotProto mogoSnapshotSetData) {
DebugConfig.setStatus(DebugConfig.sDownloadSnapshot, true);
Message msg = new Message();
Message msg = mSnapshotHandler.obtainMessage();
msg.obj = mogoSnapshotSetData;
msg.what = MSG_SNAPSHOT;
msg.sendToTarget();
mSnapshotHandler.sendMessage(msg);
}
});