Commit bd48e77f authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 3de20a57
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<!-- 业务使用权限 --> <!-- 业务使用权限 -->
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<application <application
......
...@@ -12,7 +12,6 @@ import com.downloader.PRDownloaderConfig; ...@@ -12,7 +12,6 @@ import com.downloader.PRDownloaderConfig;
import com.duben.heliapp.common.Constant; import com.duben.heliapp.common.Constant;
import com.duben.heliapp.manager.CsjAppLogManager; import com.duben.heliapp.manager.CsjAppLogManager;
import com.duben.heliapp.manager.TXCSDKService; import com.duben.heliapp.manager.TXCSDKService;
import com.duben.heliapp.manager.TalkingDataManager;
import com.duben.heliapp.net.LoanService; import com.duben.heliapp.net.LoanService;
import com.duben.heliapp.net.V6Service; import com.duben.heliapp.net.V6Service;
import com.duben.heliapp.utils.AppPreferencesManager; import com.duben.heliapp.utils.AppPreferencesManager;
...@@ -81,8 +80,6 @@ public class MintsApplication extends MultiDexApplication { ...@@ -81,8 +80,6 @@ public class MintsApplication extends MultiDexApplication {
CsjAppLogManager.INSTANCE.init(this); CsjAppLogManager.INSTANCE.init(this);
TalkingDataManager.INSTANCE.init(this);
// PR下载附件 // PR下载附件
initPRDownloader(); initPRDownloader();
...@@ -91,7 +88,6 @@ public class MintsApplication extends MultiDexApplication { ...@@ -91,7 +88,6 @@ public class MintsApplication extends MultiDexApplication {
// bugly // bugly
CrashReport.initCrashReport(this, "d035276c5b", BuildConfig.DEBUG); CrashReport.initCrashReport(this, "d035276c5b", BuildConfig.DEBUG);
} }
/** /**
......
package com.duben.heliapp.manager
import android.app.Application
import android.content.Context
import com.duben.heliapp.BuildConfig
import com.duben.heliapp.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){
TCAgent.onPageStart(cxt, name)
}
fun onPause(cxt:Context,name:String){
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