mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Add back http crash report for now
This commit is contained in:
parent
5649668bfb
commit
15ba128095
@ -192,6 +192,7 @@ dependencies {
|
|||||||
implementation 'androidx.datastore:datastore-preferences:1.0.0'
|
implementation 'androidx.datastore:datastore-preferences:1.0.0'
|
||||||
implementation 'androidx.autofill:autofill:1.1.0'
|
implementation 'androidx.autofill:autofill:1.1.0'
|
||||||
|
|
||||||
|
implementation 'ch.acra:acra-http:5.11.1' // TODO: Remove upon release
|
||||||
implementation 'ch.acra:acra-mail:5.11.1'
|
implementation 'ch.acra:acra-mail:5.11.1'
|
||||||
implementation 'ch.acra:acra-dialog:5.11.1'
|
implementation 'ch.acra:acra-dialog:5.11.1'
|
||||||
|
|
||||||
|
@ -3,9 +3,11 @@ package org.futo.inputmethod.latin
|
|||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.acra.config.dialog
|
import org.acra.config.dialog
|
||||||
|
import org.acra.config.httpSender
|
||||||
import org.acra.config.mailSender
|
import org.acra.config.mailSender
|
||||||
import org.acra.data.StringFormat
|
import org.acra.data.StringFormat
|
||||||
import org.acra.ktx.initAcra
|
import org.acra.ktx.initAcra
|
||||||
|
import org.acra.sender.HttpSender
|
||||||
|
|
||||||
class CrashLoggingApplication : Application() {
|
class CrashLoggingApplication : Application() {
|
||||||
override fun attachBaseContext(base: Context?) {
|
override fun attachBaseContext(base: Context?) {
|
||||||
@ -22,12 +24,22 @@ class CrashLoggingApplication : Application() {
|
|||||||
resTheme = android.R.style.Theme_DeviceDefault_Dialog
|
resTheme = android.R.style.Theme_DeviceDefault_Dialog
|
||||||
}
|
}
|
||||||
|
|
||||||
mailSender {
|
if(BuildConfig.ENABLE_ACRA) {
|
||||||
mailTo = "keyboard@futo.org"
|
httpSender {
|
||||||
reportAsFile = true
|
uri = BuildConfig.ACRA_URL
|
||||||
reportFileName = "Crash.txt"
|
basicAuthLogin = BuildConfig.ACRA_USER
|
||||||
subject = "Keyboard Crash Report"
|
basicAuthPassword = BuildConfig.ACRA_PASSWORD
|
||||||
body = "I experienced this crash. My version: ${BuildConfig.VERSION_NAME}.\n\n(Enter details here if necessary)"
|
httpMethod = HttpSender.Method.POST
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mailSender {
|
||||||
|
mailTo = "keyboard@futo.org"
|
||||||
|
reportAsFile = true
|
||||||
|
reportFileName = "Crash.txt"
|
||||||
|
subject = "Keyboard Crash Report"
|
||||||
|
body =
|
||||||
|
"I experienced this crash. My version: ${BuildConfig.VERSION_NAME}.\n\n(Enter details here if necessary)"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user