dirkvranckaert / my-episodes-watch-manager

Automatically exported from code.google.com/p/my-episodes-watch-manager
1 stars 2 forks source link

Code Refactoring part 1 #104

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1) Introduce the use of more enums (for example for the episode types, now just 
numeric values 1, 2 and 3 should be enums!)
2) Introduce Constants. Different constant classes should be created, string 
values such as the names of extras on an intent and user-tracking values 
(pages, actions,...) should be in there. So for now I can only think of two 
extra constant-classes: ActivityConstants (containing the 
intent-extra-var-names) and the TrackingConstants (containing all the events 
and pageviews that are tracked)
3) Move all the activities in a separate package instead of the root of the 
project

Original issue reported on code.google.com by dirkvran...@gmail.com on 2 Dec 2010 at 11:09

GoogleCodeExporter commented 8 years ago

Original comment by dirkvran...@gmail.com on 2 Dec 2010 at 11:20

GoogleCodeExporter commented 8 years ago
4) Stop the Analytics tracker when leaving an activity (override the 
onDestory() method:

  @Override
  protected void onDestroy() {
    super.onDestroy();
    // Stop the tracker when it is no longer needed.
    tracker.stop();
  }

Original comment by dirkvran...@gmail.com on 2 Dec 2010 at 11:40

GoogleCodeExporter commented 8 years ago
Only for point 2 I have t start using the custom written CustomAnalyticsTracker 
and merge all the hardcoded strings to the enums. The custom created 
CustomAnalyticsTracker knows if we are in debug by checking a hard coded value 
in the constants. That's not the way to work so we should somehow be able to 
add a tag in the manifest and read it from there.

Original comment by dirkvran...@gmail.com on 3 Dec 2010 at 12:35

GoogleCodeExporter commented 8 years ago

Original comment by dirkvran...@gmail.com on 5 Dec 2010 at 1:10