diff --git a/astrid/src/com/todoroo/astrid/service/StatisticsService.java b/astrid/src/com/todoroo/astrid/service/StatisticsService.java index 3d6d0cfb6..787d786ef 100644 --- a/astrid/src/com/todoroo/astrid/service/StatisticsService.java +++ b/astrid/src/com/todoroo/astrid/service/StatisticsService.java @@ -6,6 +6,7 @@ package com.todoroo.astrid.service; import java.util.HashMap; +import android.app.Activity; import android.content.Context; import com.localytics.android.LocalyticsSession; @@ -28,13 +29,15 @@ public class StatisticsService { if(localyticsSession != null) { localyticsSession.open(); // Multiple calls to open are ok, we just need to make sure it gets reopened after pause - return; + } else { + localyticsSession = new LocalyticsSession(context.getApplicationContext(), + Constants.LOCALYTICS_KEY); + localyticsSession.open(); + localyticsSession.upload(); } - localyticsSession = new LocalyticsSession(context.getApplicationContext(), - Constants.LOCALYTICS_KEY); - localyticsSession.open(); - localyticsSession.upload(); + if (context instanceof Activity) + localyticsSession.tagScreen(context.getClass().getSimpleName()); } /**