This commit is contained in:
wangcongtao
2020-06-03 11:16:03 +08:00
parent ac7fd86306
commit c4d3d2f7e2
109 changed files with 612 additions and 70 deletions

View File

@@ -1,5 +1,6 @@
package com.mogo.module.service;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
@@ -273,6 +274,7 @@ public class MogoServices implements IMogoMapListener,
public void init( Context context ) {
mContext = context;
initWorkThread();
MarkerServiceHandler.init( mContext );
@@ -323,6 +325,22 @@ public class MogoServices implements IMogoMapListener,
mFragmentManager.addMainFragmentStackTransactionListener( this );
CarIconDisplayStrategy.getInstance().changeCarIconStatus( mStatusManager.isSeekHelping() );
if ( DebugConfig.isLaunchLocationService() ) {
initLocationServiceProcess( context );
}
}
private void initLocationServiceProcess( Context context ) {
try {
Intent intent = new Intent();
intent.setAction( "com.zhidao.locationinfo.service.uploaddataservice" );
ComponentName cn = new ComponentName( "com.zhidao.locationinfo", "com.zhidao.locationinfo.service.UploadDataService" );
intent.setComponent( cn );
context.startService( intent );
} catch ( Exception e ) {
Logger.e( TAG, e, "start location service error." );
}
}
private void initWorkThread() {