Commit 326e87ad authored by mengcuiguang2's avatar mengcuiguang2

添加第一次打开开屏随机弹出

parent 71b1d6aa
......@@ -12,8 +12,8 @@ android {
applicationId "com.mints.helivideo"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 11
versionName "1.1.0"
versionCode 12
versionName "1.1.1"
flavorDimensions "default"
// dex突破65535的限制
......
......@@ -54,13 +54,12 @@ 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);
// 三方配置
thirdConfig();
......@@ -80,6 +79,8 @@ public class MintsApplication extends MultiDexApplication {
if (AppPreferencesManager.INSTANCE.get()
.getBoolean(Constant.LOAN_PERMISSION_FLAG, true)) return;
// 判断应用是否在前台
ForegroundOrBackground.init(this);
initMiitHelper();
......
......@@ -34,10 +34,10 @@ object TalkingDataManager {
}
fun onResume(cxt:Context,name:String){
TCAgent.onPageStart(cxt, name)
// TCAgent.onPageStart(cxt, name)
}
fun onPause(cxt:Context,name:String){
TCAgent.onPageEnd(cxt, name)
// TCAgent.onPageEnd(cxt, name)
}
}
\ No newline at end of file
......@@ -22,31 +22,31 @@ object UmengManager {
* 友盟初始化
*/
fun initUm(application: Application, channel: String) {
try {
/*
* 参数4:设备类型,必须参数,传参数为UMConfigure.DEVICE_TYPE_PHONE则表示手机;传参数为UMConfigure.DEVICE_TYPE_BOX则表示盒子;默认为手机。
* 参数5:Push推送业务的secret,需要集成Push功能时必须传入Push的secret,否则传空。
*/
UMConfigure.init(
application,
MateUtils.getAppMetaData(application, "UMENG_KEY"),
channel,
UMConfigure.DEVICE_TYPE_PHONE,
""
)
UMConfigure.setLogEnabled(BuildConfig.DEBUG)
MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.LEGACY_MANUAL)
} catch (e: java.lang.Exception) {
e.printStackTrace()
}
// try {
// /*
// * 参数4:设备类型,必须参数,传参数为UMConfigure.DEVICE_TYPE_PHONE则表示手机;传参数为UMConfigure.DEVICE_TYPE_BOX则表示盒子;默认为手机。
// * 参数5:Push推送业务的secret,需要集成Push功能时必须传入Push的secret,否则传空。
// */
// UMConfigure.init(
// application,
// MateUtils.getAppMetaData(application, "UMENG_KEY"),
// channel,
// UMConfigure.DEVICE_TYPE_PHONE,
// ""
// )
// UMConfigure.setLogEnabled(BuildConfig.DEBUG)
// MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.LEGACY_MANUAL)
// } catch (e: java.lang.Exception) {
// e.printStackTrace()
// }
}
fun onResume(context: Context) {
MobclickAgent.onResume(context)
// MobclickAgent.onResume(context)
}
fun onPause(context: Context) {
MobclickAgent.onPause(context)
// MobclickAgent.onPause(context)
}
}
\ No newline at end of file
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