Lori Scott Member Licensed User Jan 28, 2019 #1 I have an app containing some resumable subs that may take a long time to complete. I would like to add a button that would break in and stop the subs, without finishing the activity or closing the application. Is there a way to instruct the currently running sub to stop?
I have an app containing some resumable subs that may take a long time to complete. I would like to add a button that would break in and stop the subs, without finishing the activity or closing the application. Is there a way to instruct the currently running sub to stop?
mangojack Expert Licensed User Longtime User Jan 29, 2019 #2 I would set a Global flag that the sub /s occasionally checks , only continuing if the flag state is unchanged... OR Exits if the flag has been changed (by your button or other method). @Erel posted a possible solution to a similar question here .. https://www.b4x.com/android/forum/threads/resumable-sub.82155/#post-520526 Upvote 0
I would set a Global flag that the sub /s occasionally checks , only continuing if the flag state is unchanged... OR Exits if the flag has been changed (by your button or other method). @Erel posted a possible solution to a similar question here .. https://www.b4x.com/android/forum/threads/resumable-sub.82155/#post-520526