1、使用新的渠道打包方案,将渠道值写入到已经签名的apk上面,具体参考README.md

2、将各种第三方工具使用的appid、key和渠道值改成用gradle.properties的配置方式
This commit is contained in:
CsHeng
2017-05-12 15:46:46 +08:00
parent b280e1bf89
commit 5eb5f6807e
25 changed files with 462 additions and 297 deletions

View File

@ -1,6 +1,7 @@
package com.gh.gamecenter.manager;
import android.content.Context;
import com.gh.base.AppController;
import com.gh.common.constant.Config;
import com.gh.common.util.*;
import com.gh.gamecenter.db.DataCollectionDao;
@ -124,8 +125,7 @@ public class DataCollectionManager {
private void realTimeUpload(final String type, Map<String, Object> map) {
String version = PackageUtils.getVersionName(mContext);
String user = Installation.getUUID(mContext);
String channel = (String) PackageUtils.getMetaData(mContext,
mContext.getPackageName(), "TD_CHANNEL_ID");
String channel = AppController.getInstance().getChannel();
map.put("version", version);
map.put("user", user);
map.put("device_id", TokenUtils.getDeviceId(mContext));
@ -199,8 +199,7 @@ public class DataCollectionManager {
String version = PackageUtils.getVersionName(mContext);
String user = Installation.getUUID(mContext);
String channel = (String) PackageUtils.getMetaData(mContext,
mContext.getPackageName(), "TD_CHANNEL_ID");
String channel = AppController.getInstance().getChannel();
HashMap<String, JSONArray> map = new HashMap<>();
DataCollectionInfo dataCollectionEntity;