Skip to content

Commit

Permalink
recommendation from #23
Browse files Browse the repository at this point in the history
  • Loading branch information
Anamorphosee committed Jan 14, 2024
1 parent 39bf0c9 commit 53ca186
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,11 @@ java.lang.Exception: exception at 1653565535416
### Android
To enable Stacktrace-decoroutinator for Android you should add dependency `dev.reformator.stacktracedecoroutinator:stacktrace-decoroutinator-android:2.3.8` in your Android application and call method `DecoroutinatorRuntime.load()` before creating any coroutines.

It's recomended to add `DecoroutinatorRuntime.load()` call in your `Application.onCreate()` method. Example:
It's recomended to add `DecoroutinatorRuntime.load()` call in your `Application`'s `init` block. Example:
```kotlin
class MyApp: Application() {
override fun onCreate() {
init {
DecoroutinatorRuntime.load()
super.onCreate()
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ fun getLineNumber(): Int {
}

class DecoroutinatorApplication: Application() {
override fun onCreate() {
init {
DecoroutinatorRuntime.load()
super.onCreate()
}
}

0 comments on commit 53ca186

Please sign in to comment.