Skip to content

Commit

Permalink
feat: add task complete callback
Browse files Browse the repository at this point in the history
  • Loading branch information
王晨彦 committed Jun 7, 2022
1 parent 2a2dc32 commit cd5a527
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ class AppApplication : Application() {

override fun onCreate() {
super.onCreate()
CTaskManager.start(this)
CTaskManager.start(this, onTaskComplete = {
Log.i("WCY", "task complete: $it")
}) {
Log.i("WCY", "all task complete")
}
}
}
```
Expand Down
7 changes: 6 additions & 1 deletion sample/src/main/java/me/wcy/init/sample/MainApplication.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package me.wcy.init.sample

import android.app.Application
import android.util.Log
import me.wcy.init.api.CTaskManager

/**
Expand All @@ -10,6 +11,10 @@ class MainApplication : Application() {

override fun onCreate() {
super.onCreate()
CTaskManager.start(this)
CTaskManager.start(this, onTaskComplete = {
Log.i("WCY", "task complete: $it")
}) {
Log.i("WCY", "all task complete")
}
}
}

0 comments on commit cd5a527

Please sign in to comment.