Kotlin

LifecycleService as a Foreground Service || Kotlin || LiveData || Android Tutorial



This video shows the usage of lifecycleservice using a stopwatch timer as an example. As the timer gets started, there will be a foreground service that shows a notification with a current timer. I have used a singleton pattern approach for service in order to observe live data values that are inside the service.

00:00 Intro
00:48 About base branch
01:20 Activity to Service communication
07:10 Create TimerEvent sealed class
07:54 Service to Activity communication
11:01 UI state…

Similar Posts

12 thoughts on “LifecycleService as a Foreground Service || Kotlin || LiveData || Android Tutorial
  1. Nicely presented. It's so useful and really like the way you presented. Hilt part great for the beginner as well. All the video thumbs up. I will try LifeCycleService with XMPP. Keep making great tutorials like this. 🙂 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *