From fa8d6cb85fdf90507fd4d82e4dd6f9cd90f63647 Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Wed, 4 Sep 2019 11:49:00 -0500 Subject: [PATCH] Add account ID to crashlytics reports. - Added the account ID to the crashlytics reports so that we can verify if a crash can be related to an account specific situation. --- .../bitsybitshareswallet/activities/ConnectedActivity.kt | 3 +++ .../java/cy/agorise/bitsybitshareswallet/utils/Constants.kt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/ConnectedActivity.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/ConnectedActivity.kt index c74ee12..e5ba8c4 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/ConnectedActivity.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/ConnectedActivity.kt @@ -185,6 +185,9 @@ abstract class ConnectedActivity : AppCompatActivity(), ServiceConnection { .getString(Constants.KEY_CURRENT_ACCOUNT_ID, "") ?: "" if (userId != "") mCurrentAccount = UserAccount(userId) + + // Make sure crashlytics reports contains the account ID + Crashlytics.setString(Constants.CRASHLYTICS_KEY_ACCOUNT_ID, userId) } /** diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Constants.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Constants.kt index bf55faf..1d8a399 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Constants.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Constants.kt @@ -136,4 +136,7 @@ object Constants { /** Key used to add the device language to the Crashlytics report */ const val CRASHLYTICS_KEY_LANGUAGE = "crashlytics_key_language" + + /** Key used to add the account ID to the Crashlytics report*/ + const val CRASHLYTICS_KEY_ACCOUNT_ID = "crashlytics_key_account_id" }