搜索数据收集
This commit is contained in:
@ -133,15 +133,37 @@ public class DataCollectionUtils {
|
||||
|
||||
// 上传搜索数据
|
||||
public static void uploadSearch(Context context, String... args) {
|
||||
if (args.length < 2) {
|
||||
if (args.length != 5) {
|
||||
return;
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("from", args[2]);
|
||||
map.put("search_type", args[1]);
|
||||
map.put("key", args[0]);
|
||||
map.put("from", args[1]);
|
||||
if (args.length == 3) {
|
||||
map.put("click", args[2]);
|
||||
map.put("game_id", args[3]);
|
||||
map.put("game_name", args[4]);
|
||||
map.put("netword", NetworkUtils.getConnectedType(context));
|
||||
map.put("type", "search");
|
||||
map.put("device_type", android.os.Build.MODEL);
|
||||
map.put("device_system", android.os.Build.VERSION.SDK_INT + "=" + android.os.Build.VERSION.RELEASE);
|
||||
DataCollectionManager.onEvent(context, "search", map);
|
||||
}
|
||||
|
||||
// 上传搜索点击数据
|
||||
public static void uploadSearchClick(Context context, String... args) {
|
||||
if (args.length != 5) {
|
||||
return;
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("from", args[2]);
|
||||
map.put("search_type", args[1]);
|
||||
map.put("key", args[0]);
|
||||
map.put("game_id", args[3]);
|
||||
map.put("game_name", args[4]);
|
||||
map.put("netword", NetworkUtils.getConnectedType(context));
|
||||
map.put("type", "click");
|
||||
map.put("device_type", android.os.Build.MODEL);
|
||||
map.put("device_system", android.os.Build.VERSION.SDK_INT + "=" + android.os.Build.VERSION.RELEASE);
|
||||
DataCollectionManager.onEvent(context, "search", map);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user