Commit 568f17ec authored by mengcuiguang2's avatar mengcuiguang2

西西移除talkingdata

parent 50d7582a
...@@ -14,7 +14,6 @@ import android.view.MenuItem; ...@@ -14,7 +14,6 @@ import android.view.MenuItem;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import com.duben.xixiplaylet.manager.TalkingDataManager;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.duben.library.utils.CommonUtils; import com.duben.library.utils.CommonUtils;
import com.duben.xixiplaylet.R; import com.duben.xixiplaylet.R;
...@@ -107,13 +106,13 @@ public abstract class BaseAppCompatActivity extends TransitionActivity { ...@@ -107,13 +106,13 @@ public abstract class BaseAppCompatActivity extends TransitionActivity {
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
TalkingDataManager.INSTANCE.onResume(this,getClass().getSimpleName()); // TalkingDataManager.INSTANCE.onResume(this,getClass().getSimpleName());
} }
@Override @Override
protected void onPause() { protected void onPause() {
super.onPause(); super.onPause();
TalkingDataManager.INSTANCE.onPause(this,getClass().getSimpleName()); // TalkingDataManager.INSTANCE.onPause(this,getClass().getSimpleName());
} }
@Override @Override
......
...@@ -12,7 +12,6 @@ import com.downloader.PRDownloaderConfig; ...@@ -12,7 +12,6 @@ import com.downloader.PRDownloaderConfig;
import com.duben.xixiplaylet.ad.TTAdManagerHolder; import com.duben.xixiplaylet.ad.TTAdManagerHolder;
import com.duben.xixiplaylet.common.Constant; import com.duben.xixiplaylet.common.Constant;
import com.duben.xixiplaylet.manager.TXCSDKService; import com.duben.xixiplaylet.manager.TXCSDKService;
import com.duben.xixiplaylet.manager.TalkingDataManager;
import com.duben.xixiplaylet.net.LoanService; import com.duben.xixiplaylet.net.LoanService;
import com.duben.xixiplaylet.net.V6Service; import com.duben.xixiplaylet.net.V6Service;
import com.duben.xixiplaylet.utils.AppPreferencesManager; import com.duben.xixiplaylet.utils.AppPreferencesManager;
...@@ -79,7 +78,7 @@ public class MintsApplication extends MultiDexApplication { ...@@ -79,7 +78,7 @@ public class MintsApplication extends MultiDexApplication {
TXCSDKService.init(this); TXCSDKService.init(this);
TalkingDataManager.INSTANCE.init(this); // TalkingDataManager.INSTANCE.init(this);
// 判断应用是否在前台 // 判断应用是否在前台
ForegroundOrBackground.init(this); ForegroundOrBackground.init(this);
......
package com.duben.xixiplaylet.manager //package com.duben.xixiplaylet.manager
//
import android.app.Application //import android.app.Application
import android.content.Context //import android.content.Context
import com.duben.xixiplaylet.BuildConfig //import com.duben.xixiplaylet.BuildConfig
import com.duben.xixiplaylet.common.Constant //import com.duben.xixiplaylet.common.Constant
import com.duben.xixiplaylet.utils.AppPreferencesManager.get //import com.duben.xixiplaylet.utils.AppPreferencesManager.get
import com.duben.xixiplaylet.utils.MateUtils //import com.duben.xixiplaylet.utils.MateUtils
import com.tendcloud.tenddata.TCAgent //import com.tendcloud.tenddata.TCAgent
//
/** ///**
* TalkingData // * TalkingData
*/ // */
object TalkingDataManager { //object TalkingDataManager {
//
private const val APP_KEY =BuildConfig.RELEASE_TALKING_DATA_KEY // private const val APP_KEY =BuildConfig.RELEASE_TALKING_DATA_KEY
//
//
fun init(application:Application) { // fun init(application:Application) {
try { // try {
//打开日志 // //打开日志
TCAgent.LOG_ON = BuildConfig.LOG_DEBUG // TCAgent.LOG_ON = BuildConfig.LOG_DEBUG
/** // /**
* 动态获取渠道ID(类似友盟) // * 动态获取渠道ID(类似友盟)
* AppID说是xml文件里的密钥? // * AppID说是xml文件里的密钥?
*/ // */
TCAgent.init(application, APP_KEY // TCAgent.init(application, APP_KEY
, MateUtils.getAppMetaData(application, "CHANNEL_NAME")) // , MateUtils.getAppMetaData(application, "CHANNEL_NAME"))
/** // /**
* true-开启自动捕获错误 // * true-开启自动捕获错误
*/ // */
TCAgent.setReportUncaughtExceptions(true) // TCAgent.setReportUncaughtExceptions(true)
} catch (e: Exception) { // } catch (e: Exception) {
e.printStackTrace() // e.printStackTrace()
} // }
} // }
//
fun onResume(cxt:Context,name:String){ // fun onResume(cxt:Context,name:String){
//
// 未同意权限弹窗,不进行SDK初始化 // // 未同意权限弹窗,不进行SDK初始化
if (get().getBoolean(Constant.LOAN_PERMISSION_FLAG, true)) return // if (get().getBoolean(Constant.LOAN_PERMISSION_FLAG, true)) return
//
TCAgent.onPageStart(cxt, name) // TCAgent.onPageStart(cxt, name)
} // }
//
fun onPause(cxt:Context,name:String){ // fun onPause(cxt:Context,name:String){
// 未同意权限弹窗,不进行SDK初始化 // // 未同意权限弹窗,不进行SDK初始化
if (get().getBoolean(Constant.LOAN_PERMISSION_FLAG, true)) return // if (get().getBoolean(Constant.LOAN_PERMISSION_FLAG, true)) return
//
TCAgent.onPageEnd(cxt, name) // TCAgent.onPageEnd(cxt, name)
} // }
} //}
\ No newline at end of file \ 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