diff --git a/app/src/main/java/ai/elimu/analytics/entity/StoryBookLearningEvent.java b/app/src/main/java/ai/elimu/analytics/entity/StoryBookLearningEvent.java index 6a95c16..9e48de6 100644 --- a/app/src/main/java/ai/elimu/analytics/entity/StoryBookLearningEvent.java +++ b/app/src/main/java/ai/elimu/analytics/entity/StoryBookLearningEvent.java @@ -10,6 +10,7 @@ public class StoryBookLearningEvent extends LearningEvent { @NonNull private Long storyBookId; + private Long storyBookTitle; @NonNull private LearningEventType learningEventType; @@ -22,6 +23,14 @@ public void setStoryBookId(Long storyBookId) { this.storyBookId = storyBookId; } + public Long getStoryBookTitle() { + return storyBookTitle; + } + + public void setStoryBookTitle(Long storyBookTitle) { + this.storyBookTitle = storyBookTitle; + } + public LearningEventType getLearningEventType() { return learningEventType; } diff --git a/app/src/main/java/ai/elimu/analytics/receiver/StoryBookLearningEventReceiver.java b/app/src/main/java/ai/elimu/analytics/receiver/StoryBookLearningEventReceiver.java index 95be1ad..c03cd56 100644 --- a/app/src/main/java/ai/elimu/analytics/receiver/StoryBookLearningEventReceiver.java +++ b/app/src/main/java/ai/elimu/analytics/receiver/StoryBookLearningEventReceiver.java @@ -44,7 +44,7 @@ public void onReceive(Context context, Intent intent) { storyBookLearningEvent.setPackageName(packageName); storyBookLearningEvent.setTime(timestamp); storyBookLearningEvent.setStoryBookId(storyBookId); -// storyBookLearningEvent.setStoryBookTitle(storyBookTitle); + storyBookLearningEvent.setStoryBookTitle(storyBookTitle); storyBookLearningEvent.setLearningEventType(learningEventType); // Store in database diff --git a/app/src/main/java/ai/elimu/analytics/task/ExportEventsToCsvWorker.java b/app/src/main/java/ai/elimu/analytics/task/ExportEventsToCsvWorker.java index 82531ef..3ee82c5 100644 --- a/app/src/main/java/ai/elimu/analytics/task/ExportEventsToCsvWorker.java +++ b/app/src/main/java/ai/elimu/analytics/task/ExportEventsToCsvWorker.java @@ -334,6 +334,7 @@ private void exportStoryBookLearningEventsToCsv() { "android_id", "package_name", "storybook_id", + "storybook_title", "learning_event_type" ); StringWriter stringWriter = new StringWriter(); @@ -363,6 +364,7 @@ private void exportStoryBookLearningEventsToCsv() { storyBookLearningEvent.getAndroidId(), storyBookLearningEvent.getPackageName(), storyBookLearningEvent.getStoryBookId(), + storyBookLearningEvent.getStoryBookTitle(), storyBookLearningEvent.getLearningEventType() ); csvPrinter.flush();