The best way to cancel ongoing requests is with RequestsManager class. You can find it inside SimpleMediaManager.b4xlib. It is cross platform and works with OkHttpUtils2 / iHttpUtils2. Note that you need to add HU2_PUBLIC to the build configuration.
Unfortunately it is an old app developed more than 10 years ago.
It is too tedious to port it to B4XPages.
I am thinking to remove all the download parts entirely until users come back to me.