Cancel pause/wait on a postdelayed handler/runnable and still activate the paused code
Setup:  I have a 4 stage activity that I use a postdelayed handler to pause with two more nested postdelays.  


Timeline:

stage1 |CODE FIRES|  stage2  |CODE FIRES| stage3  |CODE FIRES|  stage4

stage1: deactivated, just shows a custom alertdialog

stage2: deactivated(mostly) with visuals for user, including countdowntimer

stage3: deactivated with 2nd countdowntimer

stage4: user interaction, no countdowns or additional pauses


I want the user to be able to skip to the end of stage2 at the press of a button, which would cancel both the countdown timer and the postdelayed (without cancelling the code it's waiting to initiate)

I've tried to cancel both and each individually but haven't succeeded, here are the commands I've used.

        countdowntimer.cancel();  // this didn't work from the button or a void call
        handler.removeCallbacks(runnable); // want to skip to end of stage2

I saw some references to try/catch, or maybe using a thread in searches but not sure how to use or if it's appropriate.

Thanks for any input.
Cancel pause/wait on a postdelayed handler/runnable and still activate the paused code
===

Setup:  I have a 4 stage activity that I use a postdelayed handler to pause with two more nested postdelays.  


Timeline:

stage1 |CODE FIRES|  stage2  |CODE FIRES| stage3  |CODE FIRES|  stage4

stage1: deactivated, just shows a custom alertdialog

stage2: deactivated(mostly) with visuals for user, including countdowntimer

stage3: deactivated with 2nd countdowntimer

stage4: user interaction, no countdowns or additional pauses


I want the user to be able to skip to the end of stage2 at the press of a button, which would cancel both the countdown timer and the postdelayed (without cancelling the code it's waiting to initiate)

I've tried to cancel both and each individually but haven't succeeded, here are the commands I've used.

        countdowntimer.cancel();  // this didn't work from the button or a void call
        handler.removeCallbacks(runnable); // want to skip to end of stage2

I saw some references to try/catch, or maybe using a thread in searches but not sure how to use or if it's appropriate.

Thanks for any input.