添加独立app保活
This commit is contained in:
@@ -13,6 +13,19 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.App"
|
||||
tools:replace="android:label">
|
||||
<!--保活用-->
|
||||
<service
|
||||
android:name="com.zhidao.boot.persistent.lib.PersistentAliveService"
|
||||
android:enabled="true"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="com.zhidao.boot.persistent.lib.action" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<activity
|
||||
android:name="com.zhidao.boot.persistent.lib.PersistentAliveActivity"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.launcher;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.multidex.MultiDex;
|
||||
@@ -14,6 +15,7 @@ import com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant;
|
||||
import com.mogo.module.carchatting.card.CallChatConstant;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.main.service.MogoMainService;
|
||||
import com.mogo.module.media.MediaConstants;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.module.tanlu.constant.TanluConstants;
|
||||
@@ -22,6 +24,7 @@ import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.connection.IMogoSocketManager;
|
||||
import com.mogo.utils.logger.LogLevel;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.boot.persistent.lib.PersistentManager;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -67,6 +70,12 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addBaseModule( new MogoModule( V2XConst.PATH_V2X_UI, V2XConst.PATH_V2X_UI ) );
|
||||
// 暂时去掉推送
|
||||
// MogoModulePaths.addModule(new MogoModule(PushUIConstants.TAG, PushUIConstants.TAG));
|
||||
|
||||
if (!DebugConfig.isLauncher()) {
|
||||
PersistentManager.getInstance().initManager(this);
|
||||
Intent intent = new Intent( this, MogoMainService.class );
|
||||
startService( intent );
|
||||
}
|
||||
Log.i( "timer", "cost " + ( System.currentTimeMillis() - start ) + "ms" );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user