Change acra sender to http
This commit is contained in:
@@ -28,6 +28,8 @@ android {
|
|||||||
// define this values in your local.properties file
|
// define this values in your local.properties file
|
||||||
buildConfigField 'String', 'SHIKIMORI_CLIENT_ID', "\"${localProperty('shikimori.clientId')}\""
|
buildConfigField 'String', 'SHIKIMORI_CLIENT_ID', "\"${localProperty('shikimori.clientId')}\""
|
||||||
buildConfigField 'String', 'SHIKIMORI_CLIENT_SECRET', "\"${localProperty('shikimori.clientSecret')}\""
|
buildConfigField 'String', 'SHIKIMORI_CLIENT_SECRET', "\"${localProperty('shikimori.clientSecret')}\""
|
||||||
|
resValue "string", "acra_login", "${localProperty('acra.login')}"
|
||||||
|
resValue "string", "acra_password", "${localProperty('acra.password')}"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
@@ -119,7 +121,7 @@ dependencies {
|
|||||||
implementation 'com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0'
|
implementation 'com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0'
|
||||||
implementation 'com.github.solkin:disk-lru-cache:1.4'
|
implementation 'com.github.solkin:disk-lru-cache:1.4'
|
||||||
|
|
||||||
implementation 'ch.acra:acra-mail:5.9.6'
|
implementation 'ch.acra:acra-http:5.9.6'
|
||||||
implementation 'ch.acra:acra-dialog:5.9.6'
|
implementation 'ch.acra:acra-dialog:5.9.6'
|
||||||
|
|
||||||
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
|
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
|
||||||
|
|||||||
@@ -8,9 +8,10 @@ import androidx.fragment.app.strictmode.FragmentStrictMode
|
|||||||
import androidx.room.InvalidationTracker
|
import androidx.room.InvalidationTracker
|
||||||
import org.acra.ReportField
|
import org.acra.ReportField
|
||||||
import org.acra.config.dialog
|
import org.acra.config.dialog
|
||||||
import org.acra.config.mailSender
|
import org.acra.config.httpSender
|
||||||
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
|
||||||
import org.koin.android.ext.android.get
|
import org.koin.android.ext.android.get
|
||||||
import org.koin.android.ext.android.getKoin
|
import org.koin.android.ext.android.getKoin
|
||||||
import org.koin.android.ext.koin.androidContext
|
import org.koin.android.ext.koin.androidContext
|
||||||
@@ -73,7 +74,7 @@ class KotatsuApp : Application() {
|
|||||||
appWidgetModule,
|
appWidgetModule,
|
||||||
suggestionsModule,
|
suggestionsModule,
|
||||||
shikimoriModule,
|
shikimoriModule,
|
||||||
bookmarksModule
|
bookmarksModule,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -82,16 +83,25 @@ class KotatsuApp : Application() {
|
|||||||
super.attachBaseContext(base)
|
super.attachBaseContext(base)
|
||||||
initAcra {
|
initAcra {
|
||||||
buildConfigClass = BuildConfig::class.java
|
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(
|
reportContent = listOf(
|
||||||
ReportField.PACKAGE_NAME,
|
ReportField.PACKAGE_NAME,
|
||||||
ReportField.APP_VERSION_CODE,
|
ReportField.APP_VERSION_CODE,
|
||||||
ReportField.APP_VERSION_NAME,
|
ReportField.APP_VERSION_NAME,
|
||||||
ReportField.ANDROID_VERSION,
|
ReportField.ANDROID_VERSION,
|
||||||
ReportField.PHONE_MODEL,
|
ReportField.PHONE_MODEL,
|
||||||
ReportField.CRASH_CONFIGURATION,
|
|
||||||
ReportField.STACK_TRACE,
|
ReportField.STACK_TRACE,
|
||||||
ReportField.SHARED_PREFERENCES
|
ReportField.CRASH_CONFIGURATION,
|
||||||
|
ReportField.SHARED_PREFERENCES,
|
||||||
)
|
)
|
||||||
dialog {
|
dialog {
|
||||||
text = getString(R.string.crash_text)
|
text = getString(R.string.crash_text)
|
||||||
@@ -100,11 +110,6 @@ class KotatsuApp : Application() {
|
|||||||
resIcon = R.drawable.ic_alert_outline
|
resIcon = R.drawable.ic_alert_outline
|
||||||
resTheme = android.R.style.Theme_Material_Light_Dialog_Alert
|
resTheme = android.R.style.Theme_Material_Light_Dialog_Alert
|
||||||
}
|
}
|
||||||
mailSender {
|
|
||||||
mailTo = getString(R.string.email_error_report)
|
|
||||||
reportAsFile = true
|
|
||||||
reportFileName = "stacktrace.txt"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +134,7 @@ class KotatsuApp : Application() {
|
|||||||
StrictMode.ThreadPolicy.Builder()
|
StrictMode.ThreadPolicy.Builder()
|
||||||
.detectAll()
|
.detectAll()
|
||||||
.penaltyLog()
|
.penaltyLog()
|
||||||
.build()
|
.build(),
|
||||||
)
|
)
|
||||||
StrictMode.setVmPolicy(
|
StrictMode.setVmPolicy(
|
||||||
StrictMode.VmPolicy.Builder()
|
StrictMode.VmPolicy.Builder()
|
||||||
@@ -138,7 +143,7 @@ class KotatsuApp : Application() {
|
|||||||
.setClassInstanceLimit(PagesCache::class.java, 1)
|
.setClassInstanceLimit(PagesCache::class.java, 1)
|
||||||
.setClassInstanceLimit(MangaLoaderContext::class.java, 1)
|
.setClassInstanceLimit(MangaLoaderContext::class.java, 1)
|
||||||
.penaltyLog()
|
.penaltyLog()
|
||||||
.build()
|
.build(),
|
||||||
)
|
)
|
||||||
FragmentStrictMode.defaultPolicy = FragmentStrictMode.Policy.Builder()
|
FragmentStrictMode.defaultPolicy = FragmentStrictMode.Policy.Builder()
|
||||||
.penaltyDeath()
|
.penaltyDeath()
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<string name="url_twitter">https://twitter.com/kotatsuapp</string>
|
<string name="url_twitter">https://twitter.com/kotatsuapp</string>
|
||||||
<string name="url_reddit">https://reddit.com/user/kotatsuapp</string>
|
<string name="url_reddit">https://reddit.com/user/kotatsuapp</string>
|
||||||
<string name="url_weblate">https://hosted.weblate.org/engage/kotatsu</string>
|
<string name="url_weblate">https://hosted.weblate.org/engage/kotatsu</string>
|
||||||
<string name="email_error_report">kotatsu@waifu.club</string>
|
<string name="url_error_report" translatable="false">https://acra.rumblur.space/report</string>
|
||||||
<string-array name="values_theme" translatable="false">
|
<string-array name="values_theme" translatable="false">
|
||||||
<item>-1</item>
|
<item>-1</item>
|
||||||
<item>1</item>
|
<item>1</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user