修改错误上传逻辑,修改第一次启动判断字段

This commit is contained in:
huangzhuanghua
2016-10-26 10:54:43 +08:00
parent 2954260722
commit ab9a8fd106
4 changed files with 39 additions and 32 deletions

View File

@ -9,6 +9,8 @@ import android.util.Log;
import android.widget.Toast;
import com.gh.common.util.FileUtils;
import com.gh.common.util.NetworkUtils;
import com.gh.common.util.RunningUtils;
import com.gh.gamecenter.SplashScreenActivity;
import com.gh.gamecenter.manager.DataCollectionManager;
import com.tencent.stat.StatService;
@ -78,16 +80,16 @@ public class AppUncaHandler implements UncaughtExceptionHandler {
// MTA主动上传错误
StatService.reportError(appController.getApplicationContext(), errorMsg);
// WIFI实时上传错误数据
Map<String, Object> map = new HashMap<>();
map.put("content", errorMsg);
map.put("type", android.os.Build.MODEL);
map.put("system", android.os.Build.VERSION.SDK_INT + "="
+ android.os.Build.VERSION.RELEASE);
DataCollectionManager.onEvent(appController.getApplicationContext(),
"error", map, false);
map.put("system", android.os.Build.VERSION.SDK_INT + "=" + android.os.Build.VERSION.RELEASE);
DataCollectionManager.onEvent(appController.getApplicationContext(), "error", map,
NetworkUtils.isWifiConnected(appController.getApplicationContext()));
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss",
Locale.getDefault());
// 保存到本地
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.getDefault());
File file = new File(FileUtils.getLogPath(appController.getApplicationContext(),
format.format(new Date()) + "_gh_assist" + ".log"));
FileWriter writer = null;
@ -107,6 +109,7 @@ public class AppUncaHandler implements UncaughtExceptionHandler {
}
}
}
}
/**