Skip to content
Advertisement

How to check if Handler has an active task?

If I have a Handler handler = new Handler() and run a delayed task for it handler.postDelayed(xxx, xxx), is that possible to check has the postDelayed() was called or not?

Advertisement

Answer

is that possible to check has the postDelayed() was called or not?

One quick fix, in method assign some boolean variable to true and then just perform checking.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement