Commit 568f17ec authored by mengcuiguang2's avatar mengcuiguang2

西西移除talkingdata

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