mirror of
https://github.com/dzeiocom/crashhandler.git
synced 2025-04-22 02:42:16 +00:00
fix: Add prefs to the demo app (#5)
This commit is contained in:
parent
4b69425b94
commit
09cb0abcb7
@ -46,4 +46,7 @@ dependencies {
|
||||
|
||||
// Navigation because I don't want to maintain basic transactions and shit
|
||||
implementation("androidx.navigation:navigation-fragment-ktx:2.5.1")
|
||||
|
||||
// preferences
|
||||
implementation("androidx.preference:preference-ktx:1.2.0")
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.dzeio.crashhandlertest
|
||||
|
||||
import androidx.preference.PreferenceManager
|
||||
import com.dzeio.crashhandler.CrashHandler
|
||||
import com.dzeio.crashhandlertest.ui.ErrorActivity
|
||||
|
||||
@ -7,9 +8,13 @@ class Application : android.app.Application() {
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
val prefs = PreferenceManager.getDefaultSharedPreferences(this)
|
||||
|
||||
CrashHandler.Builder()
|
||||
.withActivity(ErrorActivity::class.java)
|
||||
.withContext(this)
|
||||
.withPrefs(prefs)
|
||||
.withPrefsKey("com.dzeio.crashhandler.key")
|
||||
.withPrefix("Pouet :D")
|
||||
.withSuffix("WHYYYYY")
|
||||
.build().setup()
|
||||
|
Loading…
x
Reference in New Issue
Block a user