Skip to content

Instantly share code, notes, and snippets.

@molidev8
Created June 11, 2022 16:49
Show Gist options
  • Save molidev8/fb96ee7d95a5153ae1fbee0bea42d29a to your computer and use it in GitHub Desktop.
Save molidev8/fb96ee7d95a5153ae1fbee0bea42d29a to your computer and use it in GitHub Desktop.
A barebones foreground service
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