admin
2021-03-09 6aed6290ad05fe2aa125bb8e804e2e8c2f13a613
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package com.weikou.beibeivideo.util;
 
import android.content.Context;
 
import com.umeng.analytics.MobclickAgent;
import com.weikou.beibeivideo.BeibeiVideoApplication;
 
import java.util.HashMap;
import java.util.Map;
 
public class UmengEventUtil {
 
    private static void event(Context context, String key, Map<String, Object> params) {
        if (params == null)
            params = new HashMap<>();
        if (context != null)
            MobclickAgent.onEventObject(context, key, params);
    }
 
    //播放风行视频
    public static void funtvPlay(Context context) {
        event(context, "funtv-play", null);
    }
 
    //播放pptv
    public static void pptvPlay(Context context) {
        event(context, "pptv-play", null);
    }
 
    /**
     * 搜索
     *
     * @param context
     */
    public static void search(Context context, String videoType) {
        Map<String, Object> params = new HashMap<>();
        params.put("video-type", videoType);
        event(context, "search", params);
    }
 
    //进入视频详情
    public static void videoDetail(Context context, String from) {
        Map<String, Object> params = new HashMap<>();
        params.put("from", from);
        event(context, "video-detail", params);
    }
 
    //百度CPU内容进入
    public static void baiduCpuClick(Context context, String type) {
        Map<String, Object> params = new HashMap<>();
        params.put("type", type);
        event(context, "baidu-cpu-detail", params);
    }
 
 
}