With me, for IntentService, I was thinking about broadcasting when the progress bar started and when the progress bar ended. You can usually use the standard βbacktrackβ for the end part. You can record different intent broadcasts with different lines.
The tricky part was figuring out a way to call, to find out if the execution line was canceled, and I thought about the status table being updated as the REST call progresses. The table will have a call identifier, and after that the record will be deleted. The table will track if the stream should be active.
So, the REST thread will check the table before each send and stop all / ignore the data sending if it detects a cancellation
source share