Meshtastic-Android/app/src/main/java/com/geeksville/mesh/MeshUtilApplication.kt

29 lines
952 B
Kotlin
Raw Normal View History

2020-01-22 21:46:41 -08:00
package com.geeksville.mesh
2020-01-22 09:28:59 -08:00
import android.os.Debug
2020-01-22 09:28:59 -08:00
import com.geeksville.android.GeeksvilleApplication
2020-02-14 07:47:20 -08:00
import com.geeksville.android.Logging
2020-02-24 15:33:35 -08:00
import com.geeksville.util.Exceptions
import com.google.firebase.crashlytics.FirebaseCrashlytics
2020-01-22 09:28:59 -08:00
class MeshUtilApplication : GeeksvilleApplication(null, "58e72ccc361883ea502510baa46580e3") {
override fun onCreate() {
super.onCreate()
2020-02-14 07:47:20 -08:00
Logging.showLogs = BuildConfig.DEBUG
// We default to off in the manifest, FIXME turn on only if user approves
// leave off when running in the debugger
2020-02-24 15:33:35 -08:00
if (!BuildConfig.DEBUG || !Debug.isDebuggerConnected()) {
val crashlytics = FirebaseCrashlytics.getInstance()
crashlytics.setCrashlyticsCollectionEnabled(true)
// Attach to our exception wrapper
Exceptions.reporter = { exception, _, _ ->
crashlytics.recordException(exception)
}
}
}
}