Skip to content

Commit

Permalink
Merge pull request #109 from sky-map-team/fixsomeanalytics
Browse files Browse the repository at this point in the history
Neglected to add analytics for the new calib activity.
  • Loading branch information
jaydeetay committed Apr 28, 2016
2 parents 4a94fd8 + 5e582b3 commit e54695e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.google.android.stardroid"
minSdkVersion 15
targetSdkVersion 23
versionCode 1426
versionName "1.8.4"
versionCode 1427
versionName "1.8.4.1"
buildConfigField 'String', 'GOOGLE_ANALYTICS_CODE', '""'
}
signingConfigs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import com.google.android.stardroid.R;
import com.google.android.stardroid.activities.util.SensorAccuracyDecoder;
import com.google.android.stardroid.util.Analytics;
import com.google.android.stardroid.util.MiscUtil;

import javax.inject.Inject;
Expand All @@ -27,6 +28,7 @@ public class CompassCalibrationActivity extends InjectableActivity implements Se
@Inject SensorManager sensorManager;
@Inject SensorAccuracyDecoder accuracyDecoder;
@Inject SharedPreferences sharedPreferences;
@Inject Analytics analytics;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -89,4 +91,10 @@ public void onAccuracyChanged(Sensor sensor, int accuracy) {
public void onOkClicked(View unused) {
finish();
}

@Override
public void onStart() {
super.onStart();
analytics.trackPageView(Analytics.COMPASS_CALIBRATION_ACTIVITY);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public static enum Slice {

// Page Views
public static final String APPLICATION_CREATE = "/ApplicationCreate";
public static final String COMPASS_CALIBRATION_ACTIVITY = "/MainPage/Calibration";
public static final String DIAGNOSTICS_ACTIVITY = "/MainPage/Diagnostics";
public static final String DYNAMIC_STARMAP_ACTIVITY = "/MainPage";
public static final String EDIT_SETTINGS_ACTIVITY = "/MainPage/EditSettings";
Expand Down

0 comments on commit e54695e

Please sign in to comment.