mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Switch to email crash reporting
This commit is contained in:
parent
314df88693
commit
2a4840d794
@ -192,7 +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'
|
implementation 'ch.acra:acra-mail:5.11.1'
|
||||||
implementation 'ch.acra:acra-dialog:5.11.1'
|
implementation 'ch.acra:acra-dialog:5.11.1'
|
||||||
|
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
|
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="crashed_text">FUTO Keyboard has crashed! Please send a report to help us fix this.
|
<string name="crashed_text">FUTO Keyboard has crashed! Please email us a report to help us fix this (voiceinput@futo.org)</string>
|
||||||
Note: If you are experiencing repeated crashes, please update the app or contact us.</string>
|
|
||||||
<string name="crashed_title">Crash Reporter</string>
|
<string name="crashed_title">Crash Reporter</string>
|
||||||
|
|
||||||
<string name="crash_report_accept">Send Report</string>
|
<string name="crash_report_accept">Send Report</string>
|
||||||
|
@ -3,33 +3,31 @@ 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.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?) {
|
||||||
super.attachBaseContext(base)
|
super.attachBaseContext(base)
|
||||||
|
|
||||||
if(BuildConfig.ENABLE_ACRA) {
|
initAcra {
|
||||||
initAcra {
|
reportFormat = StringFormat.JSON
|
||||||
reportFormat = StringFormat.JSON
|
|
||||||
|
|
||||||
dialog {
|
dialog {
|
||||||
text = getString(R.string.crashed_text)
|
text = getString(R.string.crashed_text)
|
||||||
title = getString(R.string.crashed_title)
|
title = getString(R.string.crashed_title)
|
||||||
positiveButtonText = getString(R.string.crash_report_accept)
|
positiveButtonText = getString(R.string.crash_report_accept)
|
||||||
negativeButtonText = getString(R.string.crash_report_reject)
|
negativeButtonText = getString(R.string.crash_report_reject)
|
||||||
resTheme = android.R.style.Theme_DeviceDefault_Dialog
|
resTheme = android.R.style.Theme_DeviceDefault_Dialog
|
||||||
}
|
}
|
||||||
|
|
||||||
httpSender {
|
mailSender {
|
||||||
uri = BuildConfig.ACRA_URL
|
mailTo = "keyboard@futo.org"
|
||||||
basicAuthLogin = BuildConfig.ACRA_USER
|
reportAsFile = true
|
||||||
basicAuthPassword = BuildConfig.ACRA_PASSWORD
|
reportFileName = "Crash.txt"
|
||||||
httpMethod = HttpSender.Method.POST
|
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