diff --git a/app/build.gradle b/app/build.gradle
index 325e1849a1..96db0a7be8 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -125,6 +125,7 @@ android {
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'
buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"'
+ buildConfigField "String", "COMMITED", '"' + allCommited() + '"'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// if you change minSdkVersion to less than 11, you need to change executeTask for wear
diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt
index c2b7ae6073..b07111ed3b 100644
--- a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt
+++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt
@@ -25,6 +25,7 @@ import androidx.appcompat.widget.Toolbar
import androidx.core.app.ActivityCompat
import androidx.viewpager2.widget.ViewPager2
import com.google.android.material.tabs.TabLayoutMediator
+import com.google.firebase.crashlytics.FirebaseCrashlytics
import com.joanzapata.iconify.Iconify
import com.joanzapata.iconify.fonts.FontAwesomeModule
import dev.doubledot.doki.ui.DokiActivity
@@ -318,6 +319,7 @@ class MainActivity : NoSplashAppCompatActivity() {
message += "Flavor: ${BuildConfig.FLAVOR}${BuildConfig.BUILD_TYPE}\n"
message += "${resourceHelper.gs(R.string.configbuilder_nightscoutversion_label)} ${nsSettingsStatus.nightscoutVersionName}"
if (buildHelper.isEngineeringMode()) message += "\n${resourceHelper.gs(R.string.engineering_mode_enabled)}"
+ if (!fabricPrivacy.fabricEnabled()) message += "\n${resourceHelper.gs(R.string.fabric_upload_disabled)}"
message += resourceHelper.gs(R.string.about_link_urls)
val messageSpanned = SpannableString(message)
Linkify.addLinks(messageSpanned, Linkify.WEB_URLS)
@@ -398,6 +400,12 @@ class MainActivity : NoSplashAppCompatActivity() {
fabricPrivacy.firebaseAnalytics.setUserProperty("Profile", activePlugin.activeProfileInterface.javaClass.simpleName)
activePlugin.activeSensitivity.let { fabricPrivacy.firebaseAnalytics.setUserProperty("Sensitivity", it::class.java.simpleName) }
activePlugin.activeInsulin.let { fabricPrivacy.firebaseAnalytics.setUserProperty("Insulin", it::class.java.simpleName) }
+ // Add to crash log too
+ FirebaseCrashlytics.getInstance().setCustomKey("HEAD", BuildConfig.HEAD)
+ FirebaseCrashlytics.getInstance().setCustomKey("Version", BuildConfig.VERSION)
+ FirebaseCrashlytics.getInstance().setCustomKey("Remote", remote)
+ FirebaseCrashlytics.getInstance().setCustomKey("Commited", BuildConfig.COMMITED)
+ FirebaseCrashlytics.getInstance().setCustomKey("Hash", hashes[0])
}
}
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 013840fe77..fb96173fbe 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1428,5 +1428,6 @@
Use reminder to start eating later instead of wizard result during high glycemia ("pre-bolus")
Time to eat!\nRun Bolus wizard and do calculation again.
Time to eat
+ Crash logs upload disabled!