增加了注释说明

This commit is contained in:
董宏宇
2021-01-28 10:26:47 +08:00
parent 9c1f40f9ad
commit 9ca73c3083
5 changed files with 12 additions and 141 deletions

View File

@@ -22,19 +22,29 @@ public class MoGoApplication extends MultiDexApplication {
public void onCreate() {
super.onCreate();
// TODO 这里是模拟数据,真实情况需要传入真实的经纬度信息
Random random = new Random();
double randomLat = random.nextDouble();
double randomLon = random.nextDouble();
// 配置云服务API
MoGoAiCloudClientConfig clientConfig = new MoGoAiCloudClientConfig();
// 设置网络环境HTTP_DNS_ENV_QA、HTTP_DNS_ENV_RELEASE、HTTP_DNS_ENV_DEV
clientConfig.setNetMode(MogoHttpDnsConfig.HTTP_DNS_ENV_QA);
// 设置是否是第三APP登录
clientConfig.setThirdLogin(true);
// 设置是否输出日志
clientConfig.setShowDebugLog(true);
// 设置是否上传当前位置信息
clientConfig.setNeedUploadCoordinatesDurationInTime(true);
// 设置从蘑菇AI开放平台获取的APPKey
clientConfig.setThirdPartyAppKey("bydauto");
// 设置车机设备的唯一标识(这些表识必须是通过后台录入的设备)
clientConfig.setThirdPartyDeviceId("bydauto");
// 设置循环检测间隔时间
clientConfig.setLoopCheckDelay(15 * 1000);
// 设置DNS经纬度位置
clientConfig.setIHttpDnsCurrentLocation(new IHttpDnsCurrentLocation() {
@Nullable
@Override
@@ -43,6 +53,7 @@ public class MoGoApplication extends MultiDexApplication {
}
});
// 初始化SDK可以设置状态回调来监听
MoGoAiCloudClient.getInstance().init(this, clientConfig, null);
}