Stopping the service

We already mentioned that stopService will stop our service. Anyway, we can achieve the same by calling stopSelf() within our service implementation.

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.