opt and upgrade version

This commit is contained in:
lixiaopeng
2020-06-19 12:21:29 +08:00
parent d04d3c4602
commit be41402da9
3 changed files with 25 additions and 21 deletions

2
.idea/misc.xml generated
View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
</project>

View File

@@ -59,7 +59,7 @@ MOGO_MODULE_MAIN_INDEPENDENT_VERSION = 1.2.1.5
## 工程外部模块
# 探路
MOGO_MODULE_TANLU_VERSION=1.1.0.1-SNAPSHOT
MOGO_MODULE_TANLU_VERSION=1.2.1.1
# 车聊聊
CARCHATTING_VERSION=1.0.6
# 车聊聊接口
@@ -77,7 +77,7 @@ MOGO_MODULE_PUSH_VERSION=1.0.1
# 广告资源位
MOGO_MODULE_AD_CARD_VERSION=1.0.1
# 探路上报和分享模块
TANLULIB_VERSION=1.0.2-SNAPSHOT
TANLULIB_VERSION=1.2.1.1
## 产品库必备配置
applicationId=com.mogo.launcer

View File

@@ -27,7 +27,7 @@ public
*
* 描述
*/
@Route( path = "/service/base/info" )
@Route(path = "/service/base/info")
class MogoMainService extends Service implements IMogoLocationListener {
private static final String TAG = "MogoMainService";
@@ -40,11 +40,11 @@ class MogoMainService extends Service implements IMogoLocationListener {
@Override
public void onCreate() {
Logger.d( TAG, "基本服务启动" );
mServiceApis = ( IMogoServiceApis ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICE_APIS ).navigation();
Logger.d(TAG, "基本服务启动");
mServiceApis = (IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation();
initAndStartLocation();
initGpsSimulatorListener();
UiThreadHandler.postDelayed( () -> {
UiThreadHandler.postDelayed(() -> {
loadBaseModules();
startTanluService();
initADAS();
@@ -54,49 +54,53 @@ class MogoMainService extends Service implements IMogoLocationListener {
@Nullable
@Override
public IBinder onBind( Intent intent ) {
public IBinder onBind(Intent intent) {
return null;
}
@Override
public int onStartCommand( Intent intent, int flags, int startId ) {
public int onStartCommand(Intent intent, int flags, int startId) {
return START_STICKY;
}
private void initAndStartLocation() {
Logger.d( TAG, "开始定位" );
mLocationClient = mServiceApis.getMapServiceApi().getSingletonLocationClient( AbsMogoApplication.getApp() );
mLocationClient.addLocationListener( this );
mLocationClient.start( 2_000L );
Logger.d(TAG, "开始定位");
mLocationClient = mServiceApis.getMapServiceApi().getSingletonLocationClient(AbsMogoApplication.getApp());
mLocationClient.addLocationListener(this);
mLocationClient.start(2_000L);
}
private void initGpsSimulatorListener() {
mServiceApis.getMapServiceApi().getNavi( this ).registerCarLocationChangedListener( EventDispatchCenter.getInstance() );
mServiceApis.getMapServiceApi().getNavi(this).registerCarLocationChangedListener(EventDispatchCenter.getInstance());
}
private void loadBaseModules() {
Logger.d( TAG, "加载基本模块" );
Logger.d(TAG, "加载基本模块");
MogoModulesManager.getInstance().loadBaseModule();
}
private void startTanluService() {
MainService.Companion.launchService( getApplicationContext(), "0" );
UiThreadHandler.postDelayed(() -> {
Logger.d(TAG, "startTanluService ---------- ");
MainService.Companion.launchService(getApplicationContext(), "0");
}, 58_000L
);
}
private void initADAS() {
mServiceApis.getAdasControllerApi().init( AbsMogoApplication.getApp() );
mServiceApis.getAdasControllerApi().init(AbsMogoApplication.getApp());
}
@Override
public void onLocationChanged( MogoLocation location ) {
EventDispatchCenter.getInstance().onLocationChanged( location );
public void onLocationChanged(MogoLocation location) {
EventDispatchCenter.getInstance().onLocationChanged(location);
}
@Override
public void onDestroy() {
super.onDestroy();
if ( mLocationClient != null ) {
mLocationClient.removeLocationListener( this );
if (mLocationClient != null) {
mLocationClient.removeLocationListener(this);
mLocationClient.stop();
mLocationClient.destroy();
mLocationClient = null;