Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
* dev:
  disable ga auto activity tracking
  update bugsnag
  • Loading branch information
shalzz committed Apr 23, 2018
2 parents f202f12 + 132d6d3 commit c7e79d5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ android {
implementation 'de.psdev.licensesdialog:licensesdialog:1.8.0'

//noinspection GradleDynamicVersion
implementation 'com.bugsnag:bugsnag-android:3.+'
implementation 'com.bugsnag:bugsnag-android:4.+'

def jUnit = "junit:junit:4.12"
def mockito = "org.mockito:mockito-core:2.6.2"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/com/shalzz/attendance/MyApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public void onCreate() {
Bugsnag.init(this)
.setMaxBreadcrumbs(100);
Bugsnag.setNotifyReleaseStages("production", "development", "testing");
Bugsnag.setAutoCaptureSessions(true);
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);

if (BuildConfig.DEBUG) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,14 @@ public void onNext(User user) {
if (isViewAttached()) {
getMvpView().updateUserDetails(user);
}
Bugsnag.setUserId(user.id());
Bugsnag.setUserId(user.phone());

SharedPreferences sharedPref =
PreferenceManager.getDefaultSharedPreferences(mContext);
boolean optIn = sharedPref.getBoolean(mContext.getString(
R.string.pref_key_bugsnag_opt_in), true);
if(optIn) {
Bugsnag.setUserName(user.name());
Bugsnag.addToTab("User", "phone", user.phone());
Bugsnag.addToTab("User", "email", user.email());
Bugsnag.setUser(user.phone(), user.email(), user.name());
}

mTracker.set("&uid", user.phone());
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/xml/app_tracker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<integer name="ga_sessionTimeout">300</integer>

<!-- Enable automatic Activity measurement -->
<bool name="ga_autoActivityTracking">true</bool>
<bool name="ga_autoActivityTracking">false</bool>
<bool name="ga_reportUncaughtExceptions">false</bool>

<!-- The screen names that will appear in reports -->
Expand Down

0 comments on commit c7e79d5

Please sign in to comment.