Commit 00fe50da authored by mengcuiguang's avatar mengcuiguang

代码优化

parent f37b9415
......@@ -53,10 +53,10 @@ public class MintsApplication extends MultiDexApplication {
super.onCreate();
mContext = this.getApplicationContext();
// // 友盟SDK预初始化函数
// // preInit预初始化函数耗时极少,不会影响App首次冷启动用户体验
// UmengManager.INSTANCE.preInit(this,
// MateUtils.INSTANCE.getAppMetaData(this, "CHANNEL_NAME"));
// 友盟SDK预初始化函数
// preInit预初始化函数耗时极少,不会影响App首次冷启动用户体验
UmengManager.INSTANCE.preInit(this,
MateUtils.INSTANCE.getAppMetaData(this, "CHANNEL_NAME"));
// 判断应用是否在前台
ForegroundOrBackground.init(this);
......
package com.mints.helivideo.manager
import android.app.Application
import android.content.Context
import com.mints.helivideo.BuildConfig
import com.mints.helivideo.utils.MateUtils
import com.umeng.analytics.MobclickAgent
......@@ -40,4 +41,12 @@ object UmengManager {
}
}
fun onResume(context: Context) {
MobclickAgent.onResume(context)
}
fun onPause(context: Context) {
MobclickAgent.onPause(context)
}
}
\ No newline at end of file
......@@ -15,6 +15,7 @@ import android.view.Window;
import android.view.WindowManager;
import com.google.android.material.snackbar.Snackbar;
import com.mints.helivideo.manager.UmengManager;
import com.mints.library.utils.CommonUtils;
import com.mints.helivideo.R;
import com.readystatesoftware.systembartint.SystemBarTintManager;
......@@ -106,12 +107,15 @@ public abstract class BaseAppCompatActivity extends TransitionActivity {
@Override
protected void onResume() {
super.onResume();
UmengManager.INSTANCE.onResume(this);
}
@Override
protected void onPause() {
super.onPause();
UmengManager.INSTANCE.onPause(this);
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment