0

在我的应用程序中,我正在实现视频跟踪。我使用了以下代码

public static void Videotracking (String AppState,String Mappingevent1,String Mappingevent2,String Mappingevent3)

{   

ADMS_MediaMeasurement mediaMeasure = ADMS_MediaMeasurement.sharedInstance();
Hashtable<String, Object> milestoneMapping = new Hashtable<String, Object>();
milestoneMapping.put(Mappingevent1, "event9");
milestoneMapping.put(Mappingevent2, "event10");
milestoneMapping.put(Mappingevent3, "event11");

Hashtable<String, Object> contextDataMapping= new Hashtable<String, Object>();
contextDataMapping.put("a.media.milestones", milestoneMapping);
contextDataMapping.put("a.media.name", "eVar29,prop29");
contextDataMapping.put("a.media.segment", "eVar55");
contextDataMapping.put("a.contentType", "eVar5"); //note that this is not in the .media namespace
contextDataMapping.put("a.media.timePlayed", "event26");
contextDataMapping.put("a.media.view", "event8");
contextDataMapping.put("a.media.segmentView", "event25");
contextDataMapping.put("a.media.complete", "event12");
mediaMeasure.contextDataMapping =contextDataMapping;  
mediaMeasure.trackVars="evar57,evar58,evar59";
mediaMeasure.trackMilestones=Mappingevent1+","+Mappingevent2+","+Mappingevent3;
}

但我无法找到在视频开始或完成时将这些 dat 发送到服务器的时间,当我调用此方法时它发送两个请求而不是一个请求;

如果有任何实施视频跟踪,请提供帮助。

4

1 回答 1

1

本文档概述了在 Android 中跟踪视频的过程:http ://microsite.omniture.com/t2/help/en_US/sc/appmeasurement/android/index.html#Video_Measurement_Quick_Start

看起来您已经获得了配置跟踪的一半代码,但缺少实际调用:

function startMovie(){  
    mediaMeasure.open(mediaName,mediaLength,mediaPlayerName);
    playMovie();    
}

function endMovie(){
    stopMovie();
    mediaMeasure.close(mediaName);
}
于 2013-06-17T20:07:38.553 回答