67.4 Adding a Bound Service to the Project
To add a new class to the project, right-click on the package name (located under app -> java -> com.ebookfrenzy.localbound) within the Project tool window and select the New -> Service -> Service menu option. Specify BoundService as the class name and make sure that both the Exported and Enabled options are selected before clicking on Finish to create the class. Android Studio will load the BoundService.kt file into the editor where it will read as follows:
package com.ebookfrenzy.localbound
import android.app.Service
import android.content.Intent
import android.os.IBinder
class BoundService : Service() {
override fun onBind(intent: Intent): IBinder {
TODO("Return the communication channel to the service.")
}
}