Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 20 additions & 12 deletions app/src/main/java/com/hitesh_sahu/retailapp/AppController.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* If you use or distribute this project then you MUST ADD A COPY OF LICENCE
* Copyright (c) 2017. http://hiteshsahu.com - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited.
* If you use or distribute this project, then you MUST ADD A COPY OF LICENSE
* along with the project.
* Written by Hitesh Sahu <hiteshkrsahu@Gmail.com>, 2017.
* Written by Hitesh Sahu <hiteshkrsahu@Gmail.com>, 2017.
*/

package com.hitesh_sahu.retailapp;
Expand All @@ -17,14 +17,23 @@
import org.acra.ReportingInteractionMode;
import org.acra.annotation.ReportsCrashes;

@ReportsCrashes(mailTo = "hiteshkrsahu@gmail.com", customReportContent = {
ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME,
ReportField.ANDROID_VERSION, ReportField.PHONE_MODEL,
ReportField.CUSTOM_DATA, ReportField.STACK_TRACE, ReportField.LOGCAT}, mode = ReportingInteractionMode.TOAST, resToastText = R.string.crash_toast_text)
@ReportsCrashes(
mailTo = "hiteshkrsahu@gmail.com",
customReportContent = {
ReportField.APP_VERSION_CODE,
ReportField.APP_VERSION_NAME,
ReportField.ANDROID_VERSION,
ReportField.PHONE_MODEL,
ReportField.CUSTOM_DATA,
ReportField.STACK_TRACE,
ReportField.LOGCAT
},
mode = ReportingInteractionMode.TOAST,
resToastText = R.string.crash_toast_text
)
public class AppController extends Application {

public static final String TAG = AppController.class.getSimpleName();

private static AppController mInstance;

public static synchronized AppController getInstance() {
Expand All @@ -36,11 +45,10 @@ public void onCreate() {
super.onCreate();
mInstance = this;

// The following line triggers the initialization of ACRA for crash Log Reposrting
// Initialize ACRA for crash log reporting if enabled in preferences
if (PreferenceHelper.getPrefernceHelperInstace().getBoolean(
this, PreferenceHelper.SUBMIT_LOGS, true)) {
ACRA.init(this);
}
}

}
}