1
0
mirror of https://gitlab.shinice.net/pixeldroid/PixelDroid synced 2024-12-23 21:41:24 +01:00

Merge branch 'crash-reports' into 'master'

Add crash report using TraceDroid

Closes #208

See merge request pixeldroid/PixelDroid!241
This commit is contained in:
Matthieu 2020-09-10 22:48:46 +02:00
commit f3f983fa74
3 changed files with 9 additions and 0 deletions

View File

@ -152,6 +152,9 @@ dependencies {
implementation 'com.karumi:dexter:6.2.1'
implementation 'com.google.android:flexbox:2.0.1'
implementation 'com.github.ligi.tracedroid:lib:3.0'
implementation 'com.github.ligi.tracedroid:supportemail:3.0'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'

View File

@ -36,6 +36,7 @@ import com.mikepenz.materialdrawer.util.AbstractDrawerImageLoader
import com.mikepenz.materialdrawer.util.DrawerImageLoader
import com.mikepenz.materialdrawer.widget.AccountHeaderView
import kotlinx.android.synthetic.main.activity_main.*
import org.ligi.tracedroid.sending.TraceDroidEmailSender
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
@ -61,6 +62,9 @@ class MainActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
TraceDroidEmailSender.sendStackTraces("contact@pixeldroid.org", this)
(this.application as Pixeldroid).getAppComponent().inject(this)
//get the currently active user

View File

@ -4,6 +4,7 @@ import android.app.Application
import androidx.preference.PreferenceManager
import com.h.pixeldroid.di.*
import com.h.pixeldroid.utils.ThemeUtils
import org.ligi.tracedroid.TraceDroid
class Pixeldroid: Application() {
@ -12,6 +13,7 @@ class Pixeldroid: Application() {
override fun onCreate() {
super.onCreate()
TraceDroid.init(this)
val sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(this)
ThemeUtils.setThemeFromPreferences(sharedPreferences, resources)