接入MTA SDK

This commit is contained in:
huangzhuanghua
2016-06-15 17:24:36 +08:00
parent 30b57fd31d
commit daccb1aaa0
39 changed files with 330 additions and 455 deletions

View File

@ -11,6 +11,7 @@ import android.widget.Toast;
import com.gh.common.util.FileUtils;
import com.gh.gamecenter.SplashScreenActivity;
import com.gh.gamecenter.manager.DataCollectionManager;
import com.tencent.stat.StatService;
import java.io.File;
import java.io.FileWriter;
@ -74,6 +75,9 @@ public class AppUncaHandler implements UncaughtExceptionHandler {
private void saveLog(Throwable ex) {
String errorMsg = Log.getStackTraceString(ex);
// MTA主动上传错误
StatService.reportError(appController.getApplicationContext(), errorMsg);
Map<String, Object> map = new HashMap<String, Object>();
map.put("content", errorMsg);
map.put("createdOn", System.currentTimeMillis() / 1000);