Defining the intent service

We have our main service running and responsibility defined. We will now make more improvements to our application by introducing one more service. This time, we will define the intent service. The intent service will take over the responsibility for the execution of the database CRUD operations. Basically, we will define our intent service and perform refactoring of the code we already have.

First, we will create a new class inside the service package called DatabaseService. Before we put the whole implementation, we will register it in the Android Manifest as follows:

    <manifest xmlns:android= "" package="com.journaler"> ... <application ... > <service android:name=".service.MainService" ...

Get Mastering Android Development with Kotlin now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.