Skip to content

Commit

Permalink
Update IsolateHolderService.kt
Browse files Browse the repository at this point in the history
try to fix race condition
  • Loading branch information
mohammedX6 authored Apr 18, 2023
1 parent 8f1b096 commit 61b4a4d
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,8 @@ class IsolateHolderService : MethodChannel.MethodCallHandler, LocationUpdateList
// Starting Service as foreground with a notification prevent service from closing
val notification = getNotification()
startForeground(notificationId, notification)

pluggables.forEach {
context?.let { it1 -> it.onServiceStart(it1) }
}

Handler(Looper.getMainLooper()).postDelayed( { pluggables.forEach { context?.let { it1 -> it.onServiceStart(it1) } } }, 1000 )
}

private fun getNotification(): Notification {
Expand Down

0 comments on commit 61b4a4d

Please sign in to comment.