From 53d4df782317f93040b14f6b1b0d71f31c14bd4e Mon Sep 17 00:00:00 2001 From: Iniyal Palanisamy <123928113+IniyalPalanisamy@users.noreply.github.com> Date: Fri, 18 Oct 2024 17:24:49 +0530 Subject: [PATCH] Update AppController.java --- .../hitesh_sahu/retailapp/AppController.java | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/com/hitesh_sahu/retailapp/AppController.java b/app/src/main/java/com/hitesh_sahu/retailapp/AppController.java index 7e90381..322cc69 100644 --- a/app/src/main/java/com/hitesh_sahu/retailapp/AppController.java +++ b/app/src/main/java/com/hitesh_sahu/retailapp/AppController.java @@ -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 , 2017. + * Written by Hitesh Sahu , 2017. */ package com.hitesh_sahu.retailapp; @@ -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() { @@ -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); } } - -} \ No newline at end of file +}