opt
This commit is contained in:
@@ -134,6 +134,11 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
@Override
|
||||
public void onError( int code, String msg ) {
|
||||
Logger.w( TAG, "code = %s, msg = %s", code, msg );
|
||||
if ( !TextUtils.isEmpty( Utils.getSn() ) ) {
|
||||
if ( after != null ) {
|
||||
after.run();
|
||||
}
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
// 上报位置
|
||||
implementation 'com.zhidao.locupload:loc-upload-sdk:1.1.1'
|
||||
implementation 'com.zhidao.locupload:loc-upload-sdk:1.1.2'
|
||||
// 长链
|
||||
implementation 'com.zhidao.socket:built-in-socket:1.0.15'
|
||||
// passport
|
||||
|
||||
@@ -4,8 +4,6 @@ import android.content.Context;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.elegant.spi.annotations.Service;
|
||||
import com.mogo.base.services.BaseServicesConstants;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.service.locationinfo.IMogoLocationInfoService;
|
||||
@@ -13,8 +11,6 @@ import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.locupload.LocEnvironment;
|
||||
import com.zhidao.locupload.LocUploadConfig;
|
||||
import com.zhidao.locupload.LocUploadManager;
|
||||
import com.zhidao.locupload.Platform;
|
||||
import com.zhidao.locupload.location.LocationServiceProvider;
|
||||
|
||||
public
|
||||
/**
|
||||
@@ -76,25 +72,9 @@ class MogoLocationInfoServices implements IMogoLocationInfoService {
|
||||
public void init( Context context ) {
|
||||
LocUploadConfig.instance().
|
||||
setAppId( DebugConfig.getSocketAppId() ).
|
||||
setSocketChannelId( BaseServicesConstants.SOCKET_CHANNEL_ID ).
|
||||
setContext( context.getApplicationContext() ).
|
||||
setLocEnvironment( getEnvironment() ).
|
||||
setLoggable( DebugConfig.isDebug() ).
|
||||
setPlatform( Platform.car ).
|
||||
setLocInterval( 2000L );
|
||||
Logger.d( TAG, "sdk - init" );
|
||||
}
|
||||
|
||||
private LocEnvironment getEnvironment() {
|
||||
switch ( DebugConfig.getNetMode() ) {
|
||||
case 1:
|
||||
return LocEnvironment.dev;
|
||||
case 2:
|
||||
case 4:
|
||||
return LocEnvironment.qa;
|
||||
case 3:
|
||||
default:
|
||||
return LocEnvironment.release;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user