1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-1565 App | Tech | Attaching screenshot for fatal errors in Sentry for debug builds (#226)

This commit is contained in:
Evgenii Kozlov 2023-07-19 13:06:38 +02:00 committed by GitHub
parent e7a34c9b19
commit b82d5b797e
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,13 +2,13 @@ package com.anytypeio.anytype
import android.content.Context
import com.anytypeio.anytype.core_utils.tools.AppInfo
import com.anytypeio.anytype.core_utils.tools.SentryEnvironment
import io.sentry.Sentry
import io.sentry.SentryLevel
import io.sentry.android.core.SentryAndroid
import io.sentry.android.core.SentryAndroidOptions
import io.sentry.android.timber.SentryTimberIntegration
import io.sentry.protocol.User
import java.lang.Exception
import timber.log.Timber
class SentryCrashReporter(
@ -22,6 +22,7 @@ class SentryCrashReporter(
with(options) {
release = appInfo.versionName
environment = appInfo.sentryEnvironment.value
isAttachScreenshot = appInfo.sentryEnvironment == SentryEnvironment.DEV
if (withTimber) {
addIntegration(
SentryTimberIntegration(