How to check if Handler has an active task?

There is no direct API to achieve this but you can do a work around for this by using the sendEmptyMessage function. Hope this will help.

handler.sendEmptyMessage(some_integer);//Do this when you add the call back.
if(handler.hasMessages(some_integer))
handler.removeMessages(some_integer);//Do this after removing the call back.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)