diff --git a/app/build.gradle b/app/build.gradle index 43ea82cb..59482cc4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -67,10 +67,10 @@ dependencies { implementation 'androidx.vectordrawable:vectordrawable:1.1.0' implementation 'androidx.navigation:navigation-fragment:2.1.0' implementation 'androidx.navigation:navigation-ui:2.1.0' - implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0-rc02' - implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0-rc02' - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0-rc02' - implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0-rc02' + implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0-rc03' + implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0-rc03' + implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0-rc03' + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0-rc03' implementation 'androidx.navigation:navigation-fragment-ktx:2.1.0' implementation 'androidx.navigation:navigation-ui-ktx:2.1.0' implementation 'androidx.preference:preference:1.1.0' @@ -89,6 +89,7 @@ dependencies { implementation 'com.startapp:inapp-sdk:4.3.0' implementation 'eu.chainfire:libsuperuser:1.1.0.201907261845' implementation 'com.github.whyorean:playstore-api-v2:2.4' + implementation 'ch.acra:acra-http:5.1.3' testImplementation 'junit:junit:4.12' diff --git a/app/src/main/java/com/apkupdater/application/ApkUpdaterApplication.kt b/app/src/main/java/com/apkupdater/application/ApkUpdaterApplication.kt index 75bb1911..4fd96822 100644 --- a/app/src/main/java/com/apkupdater/application/ApkUpdaterApplication.kt +++ b/app/src/main/java/com/apkupdater/application/ApkUpdaterApplication.kt @@ -2,20 +2,31 @@ package com.apkupdater.application import android.app.Application import com.apkupdater.di.mainModule +import org.acra.ACRA +import org.acra.BuildConfig +import org.acra.annotation.AcraCore +import org.acra.annotation.AcraHttpSender +import org.acra.sender.HttpSender import org.koin.android.ext.koin.androidContext import org.koin.android.ext.koin.androidLogger import org.koin.core.context.startKoin +@AcraCore(buildConfigClass = BuildConfig::class) +@AcraHttpSender(httpMethod = HttpSender.Method.POST, uri = "https://collector.tracepot.com/8ead3e03") class ApkUpdaterApplication : Application() { override fun onCreate() { super.onCreate() + initAcra() + initKoin() + } - startKoin{ - androidLogger() - androidContext(this@ApkUpdaterApplication) - modules(mainModule) - } + private fun initKoin() = startKoin{ + androidLogger() + androidContext(this@ApkUpdaterApplication) + modules(mainModule) } -} \ No newline at end of file + private fun initAcra() = ACRA.init(this) + +}