use of com.zype.android.Db.Entity.AnalyticBeacon in project zype-android by zype.
the class PlayerFragment method attachPlayerToAnalyticsManager.
// Analytics
private void attachPlayerToAnalyticsManager(String url) {
AnalyticBeacon analyticsBeacon = playerViewModel.getAnalyticBeacon();
if (player != null && analyticsBeacon != null) {
videoViewModel.getVideo().observe(this, video -> {
Context context = getActivity().getApplicationContext();
String beacon = analyticsBeacon.beacon;
Map<String, String> customDimensions = getCustomDimensions(analyticsBeacon, video.title);
AnalyticsManager manager = AnalyticsManager.getInstance();
manager.trackPlay(context, player, beacon, url, customDimensions);
});
}
}
use of com.zype.android.Db.Entity.AnalyticBeacon in project zype-android by zype.
the class DbHelper method analyticsApiToEntity.
public static AnalyticBeacon analyticsApiToEntity(Analytics analytics) {
AnalyticBeacon result = new AnalyticBeacon();
result.beacon = analytics.beacon;
AnalyticsDimensions dimensions = analytics.dimensions;
result.device = dimensions.device;
result.playerId = dimensions.playerId;
result.siteId = dimensions.siteId;
result.videoId = dimensions.videoId;
return result;
}
Aggregations