Created
November 7, 2017 22:31
-
-
Save takn/fa1235e00bd8322104874944128ffc65 to your computer and use it in GitHub Desktop.
configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Configuration { | |
public static final String PLAYER_NAME = "Android basic media player"; | |
public static final String VIDEO_ID = "vid-123"; | |
public static final String VIDEO_NAME = "vid-123"; | |
public final Double VIDEO_LENGTH = 60D; | |
public static final String HEARTBEAT_TRACKING_SERVER = "aetv.hb.omtrdc.net"; // To be replaced with: "http://example.com" | |
public static final String HEARTBEAT_PUBLISHER = "TEST"; // To be replaced with: "test-publisher" | |
public static final String HEARTBEAT_CHANNEL = "test-channel"; | |
public static final String HEARTBEAT_OVP = "test-ovp"; | |
public static final String HEARTBEAT_SDK = "test-sdk"; | |
} | |
private void setupAndTrackVideoUseCase() { | |
//configure Nielsen | |
Handler handler = new Handler(); | |
// MediaHeartbeat.nielsenConfigure(getApplicationContext(), appInfo); | |
// Media Heartbeat initialization | |
MediaHeartbeatConfig config = new MediaHeartbeatConfig(); | |
config.trackingServer = Configuration.HEARTBEAT_TRACKING_SERVER; | |
config.channel = Configuration.HEARTBEAT_CHANNEL; | |
config.appVersion = Configuration.HEARTBEAT_SDK; | |
config.ovp = Configuration.HEARTBEAT_OVP; | |
config.playerName = Configuration.PLAYER_NAME; | |
config.ssl = false; | |
config.debugLogging = true; | |
MediaHeartbeat mediaHeartbeat = new MediaHeartbeat(this, config); | |
MediaHeartbeatExecutor heartBeatWrapper = | |
new MediaHeartbeatExecutor(new AnalyticsDataToMapTransformer<String>(), mediaHeartbeat); | |
// | |
AnalyticsProcessor heartbeatProcessor = new AnalyticsProcessor(heartBeatWrapper); | |
final VideoTrackingUseCase videoTrackingUseCase = new VideoTrackingUseCase(factory, globalRepository, heartbeatProcessor); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment