:wq
remove httpdns logic
This commit is contained in:
zhongchao
2023-03-01 16:26:10 +08:00
parent c0d96f632c
commit 5d5e2153d8
36 changed files with 139 additions and 862 deletions

View File

@@ -1,17 +1,15 @@
package com.mogo.cloud;
import android.util.Log;
import static com.mogo.cloud.passport.MoGoAiCloudClientConfig.HTTP_DNS_ENV_RELEASE;
import androidx.annotation.Nullable;
import androidx.multidex.MultiDexApplication;
import com.auto.zhidao.logsdk.CrashSystem;
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.MoGoAiCloudClient;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.cloud.passport.location.ICurrentLocation;
import com.mogo.cloud.passport.location.SimpleLocation;
import java.util.Random;
@@ -46,7 +44,7 @@ public class MoGoApplication extends MultiDexApplication {
// 配置云服务API
MoGoAiCloudClientConfig clientConfig = MoGoAiCloudClientConfig.getInstance();
// 设置网络环境HTTP_DNS_ENV_QA、HTTP_DNS_ENV_RELEASE、HTTP_DNS_ENV_DEV
clientConfig.setNetMode(MogoHttpDnsConfig.HTTP_DNS_ENV_RELEASE);
clientConfig.setNetMode(HTTP_DNS_ENV_RELEASE);
// 设置是否是第三APP登录false自有车机 true外部三方车机
clientConfig.setThirdLogin(true);
// 设置是否输出日志
@@ -63,19 +61,11 @@ public class MoGoApplication extends MultiDexApplication {
clientConfig.setThirdPartyDeviceId("12345678998765432169");
// 设置应用服务AppId 长链、鉴权 //todo 需要卸载智慧驾驶、行车记录仪
clientConfig.setServiceAppId("com.mogo.launcher");
// 设置循环检测间隔时间
clientConfig.setLoopCheckDelay(60 * 60 * 24 * 1000);
// 设置是否属于高精定位设备
clientConfig.setIsAccuracyDevice(false);
// 设置DNS经纬度位置
clientConfig.setIHttpDnsCurrentLocation(new IHttpDnsCurrentLocation() {
@Nullable
@Override
public HttpDnsSimpleLocation getCurrentLocation() {
return new HttpDnsSimpleLocation("0734", randomLat, randomLon);
}
});
clientConfig.setIHttpCurrentLocation(() -> new SimpleLocation("0734", randomLat, randomLon));
clientConfig.setUseOriginSocket(true);
// 初始化SDK可以设置状态回调来监听