Created
June 11, 2022 16:49
-
-
Save molidev8/fb96ee7d95a5153ae1fbee0bea42d29a to your computer and use it in GitHub Desktop.
A barebones foreground service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TimerService : Service() { | |
private val binder: Binder = TimerBinder() | |
override fun onBind(p0: Intent?): IBinder = binder | |
inner class TimerBinder : Binder() { | |
val service: TimerService | |
get() = this@TimerService | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment