增加了注释说明
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user