diff --git a/app/build.gradle b/app/build.gradle
index e73007a17..f2e130499 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -29,6 +29,8 @@ android {
// define this values in your local.properties file
buildConfigField 'String', 'SHIKIMORI_CLIENT_ID', "\"${localProperty('shikimori.clientId')}\""
buildConfigField 'String', 'SHIKIMORI_CLIENT_SECRET', "\"${localProperty('shikimori.clientSecret')}\""
+ resValue "string", "acra_login", "${localProperty('acra.login')}"
+ resValue "string", "acra_password", "${localProperty('acra.password')}"
}
buildTypes {
debug {
@@ -126,7 +128,7 @@ dependencies {
implementation 'com.github.KotatsuApp:subsampling-scale-image-view:d3aa1d2beb'
implementation 'com.github.solkin:disk-lru-cache:1.4'
- implementation 'ch.acra:acra-mail:5.9.5'
+ implementation 'ch.acra:acra-http:5.9.5'
implementation 'ch.acra:acra-dialog:5.9.5'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
diff --git a/app/src/main/java/org/koitharu/kotatsu/KotatsuApp.kt b/app/src/main/java/org/koitharu/kotatsu/KotatsuApp.kt
index c5ebfae04..8ddd935ab 100644
--- a/app/src/main/java/org/koitharu/kotatsu/KotatsuApp.kt
+++ b/app/src/main/java/org/koitharu/kotatsu/KotatsuApp.kt
@@ -15,9 +15,10 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import org.acra.ReportField
import org.acra.config.dialog
-import org.acra.config.mailSender
+import org.acra.config.httpSender
import org.acra.data.StringFormat
import org.acra.ktx.initAcra
+import org.acra.sender.HttpSender
import org.koitharu.kotatsu.core.db.MangaDatabase
import org.koitharu.kotatsu.core.prefs.AppSettings
import org.koitharu.kotatsu.local.data.PagesCache
@@ -59,16 +60,24 @@ class KotatsuApp : Application(), Configuration.Provider {
super.attachBaseContext(base)
initAcra {
buildConfigClass = BuildConfig::class.java
- reportFormat = StringFormat.KEY_VALUE_LIST
+ reportFormat = StringFormat.JSON
+ excludeMatchingSharedPreferencesKeys = listOf(
+ "sources_\\w+",
+ )
+ httpSender {
+ uri = getString(R.string.url_error_report)
+ basicAuthLogin = getString(R.string.acra_login)
+ basicAuthPassword = getString(R.string.acra_password)
+ httpMethod = HttpSender.Method.POST
+ }
reportContent = listOf(
ReportField.PACKAGE_NAME,
ReportField.APP_VERSION_CODE,
ReportField.APP_VERSION_NAME,
ReportField.ANDROID_VERSION,
ReportField.PHONE_MODEL,
- ReportField.CRASH_CONFIGURATION,
ReportField.STACK_TRACE,
- ReportField.CUSTOM_DATA,
+ ReportField.CRASH_CONFIGURATION,
ReportField.SHARED_PREFERENCES,
)
dialog {
@@ -78,11 +87,6 @@ class KotatsuApp : Application(), Configuration.Provider {
resIcon = R.drawable.ic_alert_outline
resTheme = android.R.style.Theme_Material_Light_Dialog_Alert
}
- mailSender {
- mailTo = getString(R.string.email_error_report)
- reportAsFile = true
- reportFileName = "stacktrace.txt"
- }
}
}
diff --git a/app/src/main/res/values/constants.xml b/app/src/main/res/values/constants.xml
index 4e9592508..88f15044d 100644
--- a/app/src/main/res/values/constants.xml
+++ b/app/src/main/res/values/constants.xml
@@ -6,7 +6,7 @@
https://twitter.com/kotatsuapp
https://reddit.com/user/kotatsuapp
https://hosted.weblate.org/engage/kotatsu
- kotatsu@waifu.club
+ http://86.57.183.214:8082/report
org.kotatsu.sync
http://86.57.183.214:8081