I have a fairly large for- loop in one of the callbacks of my app and I was looking for a possibility to show a progress bar based on the progress in the for loop. I also wanted to be able to cancel the callback.
I tweaked the example of the background callbacks a bit, this is the result. Maybe it helps somebody looking for something similar.