Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class OnCompletedBroadcastReceiver : BroadcastReceiver() {
@Inject lateinit var repository: TaskCategoryRepositoryImpl
override fun onReceive(p0: Context?, p1: Intent?) {
val taskInfo = p1?.getSerializableExtra("task_info") as? TaskInfo
if (taskInfo != null) {
taskInfo.status = true
CoroutineScope(IO).launch {
taskInfo?.let {
if (p0 != null && taskInfo != null) {
// used to remove the notification when a user taps completed button (Optional)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment