I am calling stopSelf() to terminate the service
Why? If you want to skip over logic, that's fine, but please allow onHandleIntent()
to finish normally and call stopSelf()
on its own accord. For example, there may be more Intent
commands queued up to be processed.
How can I listen for when the service is stopped?
Use an event bus, such as LocalBroadcastManager
or greenrobot's EventBus.