Skip to content

Commit

Permalink
Added Acra crash report.
Browse files Browse the repository at this point in the history
  • Loading branch information
rumboalla committed Dec 7, 2019
1 parent b4fa630 commit f7c5624
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
9 changes: 5 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

}
private fun initAcra() = ACRA.init(this)

}

0 comments on commit f7c5624

Please sign in to comment.