add MoGoAiCloud sdk --> socket passport replace origin logic

This commit is contained in:
zhongchao
2021-02-23 11:20:39 +08:00
parent 024988b241
commit 632ececb99
45 changed files with 1285 additions and 873 deletions

View File

@@ -587,6 +587,7 @@ dependencies {
implementation project(':foudations:httpdns-mogo')
}
apply from: "./functions/aicloudservices.gradle"
apply from: "./functions/basedmap.gradle"
apply from: "./functions/perform.gradle"
apply from: "./functions/baseservices.gradle"

View File

@@ -0,0 +1,37 @@
// 基础服务仅比亚迪渠道用sdk方式实现其他都基于apk基础服务
//todo SDK版本 待替换
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
bydautoImplementation rootProject.ext.dependencies.mogoaicloudservicesdk
d82xImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
em1Implementation rootProject.ext.dependencies.mogoaicloudserviceapk
em2Implementation rootProject.ext.dependencies.mogoaicloudserviceapk
d8xxImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
d80xImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
em4Implementation rootProject.ext.dependencies.mogoaicloudserviceapk
e8xxImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
f8xxImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
f80xImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
f8AmapImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
em3Implementation rootProject.ext.dependencies.mogoaicloudserviceapk
fochtaxiImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
fochbusImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
} else {
bydautoImplementation project(':foudations:mogo-aicloud-services-sdk')
d82xImplementation project(':foudations:mogo-aicloud-services-apk')
em1Implementation project(':foudations:mogo-aicloud-services-apk')
em2Implementation project(':foudations:mogo-aicloud-services-apk')
d8xxImplementation project(':foudations:mogo-aicloud-services-apk')
d80xImplementation project(':foudations:mogo-aicloud-services-apk')
em4Implementation project(':foudations:mogo-aicloud-services-apk')
e8xxImplementation project(':foudations:mogo-aicloud-services-apk')
f8xxImplementation project(':foudations:mogo-aicloud-services-apk')
f80xImplementation project(':foudations:mogo-aicloud-services-apk')
f8AmapImplementation project(':foudations:mogo-aicloud-services-apk')
em3Implementation project(':foudations:mogo-aicloud-services-apk')
fochtaxiImplementation project(':foudations:mogo-aicloud-services-apk')
fochbusImplementation project(':foudations:mogo-aicloud-services-apk')
}
}

View File

@@ -22,6 +22,7 @@ import com.mogo.module.main.service.MogoMainService;
import com.mogo.module.push.base.PushUIConstants;
import com.mogo.module.service.ServiceConst;
import com.mogo.module.share.constant.ShareConstants;
import com.mogo.realtime.api.MoGoAiCloudRealTime;
import com.mogo.service.map.IMogoSmallMapProvider;
import com.mogo.module.v2x.V2XConst;
import com.mogo.module.v2x.utils.ObuConfig;
@@ -189,24 +190,8 @@ public class MogoApplication extends AbsMogoApplication {
}
private void preparePassportEnvironment( IMogoServiceApis apis, Runnable after ) {
apis.getPassportManagerApi().requestTicket( new IMogoTicketCallback() {
@Override
public void onTicketGot( String ticket ) {
Logger.d( TAG, "ticket = %s", ticket );
}
//todo 开启MoGoAiCloud云基础服务
@Override
public void onError( int code, String msg ) {
Logger.w( TAG, "code = %s, msg = %s", code, msg );
}
@Override
public void onLoginSuccess( String token, String sn ) {
if ( after != null ) {
after.run();
}
}
} );
}
private void prepareSocketAndLocationServices( IMogoServiceApis apis ) {
@@ -217,7 +202,6 @@ public class MogoApplication extends AbsMogoApplication {
apis.getLocationInfoApi().provideLocation( location );
} );
}
apis.getWebSocketManagerApi( getApplicationContext() ).init( getApplicationContext(), DebugConfig.getSocketAppId() );
}
@Override